Explorar o código

修改7月2号和3号提出的问题:样式调整以及联锁条件新增修改的需求

yuhan hai 2 meses
pai
achega
1263be307e

+ 68 - 2
src/assets/less/interLock.css

@@ -164,12 +164,20 @@
   border-color: #1890ff !important;
   font-size: 16px;
 }
+.iotmenu-content-container .table-page-search-wrapper,
+.iotmenu-modal-box .table-page-search-wrapper {
+  height: 48px;
+}
 .iotmenu-content-container .table-page-search-wrapper .ant-form .ant-form-item .ant-form-item-label label,
 .iotmenu-modal-box .table-page-search-wrapper .ant-form .ant-form-item .ant-form-item-label label {
   color: #323233;
   font-size: 16px;
   font-weight: 400;
 }
+.iotmenu-content-container a,
+.iotmenu-modal-box a {
+  color: #008cd6;
+}
 .iotmenu-content-container .ant-input,
 .iotmenu-modal-box .ant-input,
 .iotmenu-content-container .ant-select-selection,
@@ -192,6 +200,42 @@
   color: #323233 !important;
   font-size: 15px;
 }
+.iotmenu-content-container .ant-table .edit-btn,
+.iotmenu-modal-box .ant-table .edit-btn {
+  display: inline-block;
+  width: 24px;
+  height: 24px;
+  margin: 4px 3px;
+  cursor: pointer;
+  background: url(../edit.svg);
+}
+.iotmenu-content-container .ant-table .edit-btn:hover,
+.iotmenu-modal-box .ant-table .edit-btn:hover {
+  background: url(../edit-hover.svg);
+}
+.iotmenu-content-container .ant-table .delete-btn,
+.iotmenu-modal-box .ant-table .delete-btn {
+  display: inline-block;
+  width: 24px;
+  height: 24px;
+  margin: 4px 3px;
+  cursor: pointer;
+  background: url(../delete.svg);
+}
+.iotmenu-content-container .ant-table .delete-btn:hover,
+.iotmenu-modal-box .ant-table .delete-btn:hover {
+  background: url(../delete-hover.svg);
+}
+.iotmenu-content-container .ant-table .ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-modal-box .ant-table .ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-content-container .ant-table .ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-modal-box .ant-table .ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-content-container .ant-table .ant-table-thead > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-modal-box .ant-table .ant-table-thead > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-content-container .ant-table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
+.iotmenu-modal-box .ant-table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
+  background: transparent;
+}
 .iotmenu-content-container .ant-table-fixed-left table,
 .iotmenu-modal-box .ant-table-fixed-left table,
 .iotmenu-content-container .ant-table-fixed-right table,
@@ -254,13 +298,35 @@
 .iotmenu-modal-box .ant-card {
   background: #FAFAFA;
 }
+.iotmenu-content-container .ant-card .ant-card-body,
+.iotmenu-modal-box .ant-card .ant-card-body {
+  padding: 0 24px;
+}
 .iotmenu-content-container .normal-tag,
 .iotmenu-modal-box .normal-tag {
-  color: #52c41a;
+  display: inline-block;
+  height: 24px;
+  line-height: 24px;
+  text-align: center;
+  font-size: 15px;
+  padding: 0 8px;
+  border-radius: 16px;
+  background: linear-gradient(0deg, rgba(182, 240, 211, 0.5), rgba(182, 240, 211, 0.5)), #ffffff;
+  border: 1px solid #b6f0d3;
+  color: #00cc66;
 }
 .iotmenu-content-container .abnormal-tag,
 .iotmenu-modal-box .abnormal-tag {
-  color: #fb6666;
+  display: inline-block;
+  height: 24px;
+  line-height: 24px;
+  text-align: center;
+  font-size: 15px;
+  padding: 0 8px;
+  border-radius: 16px;
+  background: linear-gradient(0deg, rgba(195, 65, 21, 0.5), rgba(197, 56, 7, 0.5)), #ffffff;
+  border: 1px solid #D65F37;
+  color: #fff;
 }
 .iotmenu-modal-box .ant-modal .ant-modal-title {
   font-size: 18px;

+ 59 - 23
src/assets/less/interLock.less

@@ -141,6 +141,7 @@
   }
   // 搜索
   .table-page-search-wrapper{
+    height: 48px;
     .ant-form{
       .ant-form-item{
         .ant-form-item-label label{
@@ -151,6 +152,9 @@
       }
     }
   }
+  a{
+    color: #008cd6;
+  }
   // 
   .ant-input, .ant-select-selection{
     background: transparent;
@@ -176,6 +180,32 @@
         }
       }
     }
+    .edit-btn{
+      display: inline-block;
+      width: 24px;
+      height: 24px;
+      margin: 4px 3px;
+      cursor: pointer;
+      background: url(../edit.svg);
+    }
+    .edit-btn:hover{
+      background: url(../edit-hover.svg);
+    }
+    .delete-btn{
+      display: inline-block;
+      width: 24px;
+      height: 24px;
+      margin: 4px 3px;
+      cursor: pointer;
+      background: url(../delete.svg);
+    }
+    .delete-btn:hover{
+      background: url(../delete-hover.svg);
+    }
+    // 取消行悬浮变色
+    .ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td, .ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td, .ant-table-thead > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td, .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td{
+      background: transparent;
+    }
   }
   .ant-table-fixed-left table, .ant-table-fixed-right table{
     background: #FAFAFA;
@@ -241,44 +271,50 @@
   }
   .ant-card{
     background: @iotTpmContentBg;
+    .ant-card-body{
+      padding: 0 24px;
+    }
   }
   /** tag不同样式 */
   .normal-tag{
-    color: #52c41a;
+    // color: #52c41a;
 
     // color: #52c41a;
     // background: #f6ffed;
     // border-color: #b7eb8f;
 
-    // display: inline-block;
-    // height: 24px;
-    // line-height: 24px;
-    // text-align: center;
-    // font-size: 15px;
-    // padding: 0 8px;
-    // border-radius: 16px;
-    // color: rgb(0, 204, 102);
-    // background: linear-gradient(0deg, rgba(182, 240, 211, 0.5), rgba(182, 240, 211, 0.5)), rgb(255, 255, 255);
-    // border: 1px solid rgb(182, 240, 211);
+    display: inline-block;
+    height: 24px;
+    line-height: 24px;
+    text-align: center;
+    font-size: 15px;
+    padding: 0 8px;
+    border-radius: 16px;
+
+    background: linear-gradient(0deg, rgba(182, 240, 211, 0.5), rgba(182, 240, 211, 0.5)), rgb(255, 255, 255);
+    border: 1px solid rgb(182, 240, 211);
+    color: rgb(0, 204, 102);
   }
   .abnormal-tag{
-    color: #fb6666;
+    // color: #fb6666;
 
     // color: #fa8c16;
     // background: #fff7e6;
     // border-color: #ffd591;
 
-    // display: inline-block;
-    // border-color: #ff9d34;
-    // height: 24px;
-    // line-height: 24px;
-    // text-align: center;
-    // font-size: 15px;
-    // padding: 0 8px;
-    // border-radius: 16px;
-    // color: #fa8c16;
-    // background: linear-gradient(0deg, rgba(240, 220, 182, 0.5), rgba(240, 217, 182, 0.5)), rgb(255, 255, 255);
-    // border: 1px solid rgb(240, 226, 182);
+    display: inline-block;
+    height: 24px;
+    line-height: 24px;
+    text-align: center;
+    font-size: 15px;
+    padding: 0 8px;
+    border-radius: 16px;
+
+    // background: linear-gradient(0deg, rgba(203, 54, 4, 0.5), rgba(205, 80, 36, 0.5)), #ffffff;
+    background: linear-gradient(0deg, rgba(195, 65, 21, 0.5), rgba(197, 56, 7, 0.5)), #ffffff;
+    border: 1px solid #D65F37;
+    // border: 1px solid #D45930;
+    color: #fff;
   }
 }
 .iotmenu-modal-box{

+ 2 - 1
src/components/module_interLock/UEquipmentTree/UEquipmentTreeDrag.vue

@@ -28,7 +28,8 @@
             <template v-slot:title="nodeData">
               <div class="item-node-container">
                 <div>
-                  <a-icon slot="icon" type="carry-out" />
+                  <a-icon slot="icon" :type="nodeData.interlockType==='0'?'cluster':'project'" />
+                  <!-- carry-out  apartment cluster -->
                   <span class="item-node-name">{{nodeData.interlockName}}</span>
                 </div>
                 <div v-if="hasHandleBtn" v-has="'edit:tree'">

+ 54 - 22
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -5,25 +5,30 @@
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="联锁名称">
+            <a-form-item label="">
               <a-input placeholder="请输入联锁名称" v-model="queryParam.interlockname"></a-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="联锁状态">
+            <a-form-item label="">
+              <a-input placeholder="请输入联锁条件" v-model="queryParam.interlockConditionTag"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="">
               <!-- <a-input placeholder="请输入联锁状态" v-model="queryParam.interlockStatus"></a-input> -->
               <j-dict-select-tag v-model="queryParam.interlockStatus" placeholder="请输入联锁状态" dictCode="interlock_status"/>
             </a-form-item>
           </a-col>
-          <template v-if="toggleSearchStatus">
-            <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="回路健康级别">
-                <!-- <a-input placeholder="请输入回路健康级别" v-model="queryParam.loopHealthLevel"></a-input> -->
-                <a-select placeholder="请输入回路健康级别" v-model="queryParam.loopHealthLevel" allowClear :options="healthLevelOption"></a-select>
-              </a-form-item>
-            </a-col>
-          </template>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="">
+              <!-- <a-input placeholder="请输入回路健康级别" v-model="queryParam.loopHealthLevel"></a-input> -->
+              <a-select placeholder="请输入回路健康级别" v-model="queryParam.loopHealthLevel" allowClear :options="healthLevelOption"></a-select>
+            </a-form-item>
+          </a-col>
+          <!-- <template v-if="toggleSearchStatus">
+          </template> -->
+          <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -32,7 +37,7 @@
                 <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
               </a>
             </span>
-          </a-col>
+          </a-col> -->
         </a-row>
       </a-form>
     </div>
@@ -57,9 +62,9 @@
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;padding-left: 18px;">
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;padding-left: 18px;">
         <span style="color: #a3a3a3;">回路健康级别:A代表回路健康;B代表回路有故障;C代表回路有严重故障;D代表回路失效;</span>
-      </div>
+      </div> -->
 
       <a-table
         ref="table"
@@ -72,10 +77,21 @@
         :pagination="ipagination"
         :loading="loading"
         class="j-table-force-nowrap"
-        :customRow="customRow"
         @change="handleTableChange">
+        <!-- :customRow="customRow" -->
         <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
+        <!-- 表头注释 -->
+        <span slot="loopHealthLevelTitle">
+          回路健康级别
+          <a-tooltip placement="top">
+            <template slot="title">
+              <span> A代表回路健康;B代表回路有故障;C代表回路有严重故障;D代表回路失效; </span>
+            </template>
+            <a-icon type="question-circle" />
+          </a-tooltip>
+        </span>
+
         <!-- 仪表状态 -->
         <span slot="instrumentStatus" slot-scope="text, record">
           <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
@@ -106,7 +122,6 @@
 
         <!-- <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
-
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -230,9 +245,10 @@
             },
           },
           {
-            title:'回路健康级别',
+            // title:'回路健康级别',
             align:"center",
             dataIndex: 'loopHealthLevel',
+            slots: { title: 'loopHealthLevelTitle' },
             customRender:(text,record,index)=> {
               var children
               if(text === 'A'){
@@ -276,19 +292,35 @@
             dataIndex: 'action',
             align:"center",
             fixed:"right",
-            width:147,
+            width: 100,
             auth: 'testdemo:action',
             // scopedSlots: { customRender: 'action' },
             customRender: (text,record,index)=> {
-              var childrenEdit = (<a onclick={() => { this.handleEdit(record) }}>编辑</a>)
-              var childrenDivider = (<a-divider type="vertical"/>)
+              var childrenEdit = (
+                <a-tooltip>
+                  <template slot="title">
+                    设置
+                  </template>
+                  <span class="edit-btn" onclick={() => { this.handleEdit(record) }}></span>
+                </a-tooltip>
+              )
+              // var childrenEdit = (<a onclick={() => { this.handleEdit(record) }}>编辑</a>)
+              // var childrenDivider = (<a-divider type="vertical"/>)
+              // <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(record.summaryid)}>
+              //   <a>删除</a>
+              // </a-popconfirm>
               var childrenMore = (
                 <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(record.summaryid)}>
-                  <a>删除</a>
+                  <a-tooltip>
+                    <template slot="title">
+                      删除
+                    </template>
+                    <span class="delete-btn"></span>
+                  </a-tooltip>
                 </a-popconfirm>
               )
               return {
-                children: [childrenEdit,childrenDivider,childrenMore],
+                children: [childrenEdit,childrenMore],
                 attrs: {
                   rowSpan: record.rowSpan
                 }
@@ -329,7 +361,7 @@
       },
     },
     methods: {
-      // 合并后悬浮行背景色一起显示
+      // 合并后悬浮行背景色一起显示--后来取消此需求
       customRow(record, index) {
         return {
           style: {

+ 160 - 71
src/views/module_interLock/InterlockSummary/modules/InterlockConditionForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-spin :spinning="confirmLoading">
+  <!-- <a-spin :spinning="confirmLoading"> -->
     <j-form-container>
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
@@ -34,38 +34,77 @@
           </a-col> -->
           <a-col :span="24">
             <a-form-model-item label="输入卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inputStatusData">
-              <a-cascader
-                v-model="model.inputStatusData"
-                :options="tagDataOptions"
-                :display-render="displayRender"
-                :fieldNames="customFieldNames"
-                expand-trigger="hover"
-                placeholder="请选择输入卡件状态"
-              />
+              <a-radio-group name="radioGroup" v-model="model.inputStatusRadio">
+                <a-radio :value="'0'"> 默认值 </a-radio>
+                <a-radio :value="'1'"> 位号读取 </a-radio>
+              </a-radio-group>
+              <template v-if="model.inputStatusRadio === '0'">
+                <!-- <a-select v-model="model.bypassNo">
+                  <a-select-option value="0"> 0 </a-select-option>
+                  <a-select-option value="1"> 1 </a-select-option>
+                </a-select> -->
+                <a-input v-model="model.inputStatusDefault" disabled></a-input>
+              </template>
+              <template v-if="model.inputStatusRadio === '1'">
+                <a-cascader
+                  v-model="model.inputStatusData"
+                  :options="tagDataOptions"
+                  :display-render="displayRender"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择输入卡件状态"
+                />
+              </template>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="输出卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outputStatusData">
-              <a-cascader
-                v-model="model.outputStatusData"
-                :options="tagDataOptions"
-                :display-render="displayRender"
-                :fieldNames="customFieldNames"
-                expand-trigger="hover"
-                placeholder="请选择输出卡件状态"
-              />
+              <a-radio-group name="radioGroup" v-model="model.outputStatusRadio">
+                <a-radio :value="'0'"> 默认值 </a-radio>
+                <a-radio :value="'1'"> 位号读取 </a-radio>
+              </a-radio-group>
+              <template v-if="model.outputStatusRadio === '0'">
+                <!-- <a-select v-model="model.bypassNo">
+                  <a-select-option value="0"> 0 </a-select-option>
+                  <a-select-option value="1"> 1 </a-select-option>
+                </a-select> -->
+                <a-input v-model="model.outputStatusDefault" disabled></a-input>
+              </template>
+              <template v-if="model.outputStatusRadio === '1'">
+                <a-cascader
+                  v-model="model.outputStatusData"
+                  :options="tagDataOptions"
+                  :display-render="displayRender"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择输出卡件状态"
+                />
+              </template>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="MP状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mpStatusData">
-              <a-cascader
-                v-model="model.mpStatusData"
-                :options="tagDataOptions"
-                :display-render="displayRender"
-                :fieldNames="customFieldNames"
-                expand-trigger="hover"
-                placeholder="请选择MP状态"
-              />
+              <a-radio-group name="radioGroup" v-model="model.mpStatusRadio">
+                <a-radio :value="'0'"> 默认值 </a-radio>
+                <a-radio :value="'1'"> 位号读取 </a-radio>
+              </a-radio-group>
+              <template v-if="model.mpStatusRadio === '0'">
+                <!-- <a-select v-model="model.bypassNo">
+                  <a-select-option value="0"> 0 </a-select-option>
+                  <a-select-option value="1"> 1 </a-select-option>
+                </a-select> -->
+                <a-input v-model="model.mpStatusDefault" disabled></a-input>
+              </template>
+              <template v-if="model.mpStatusRadio === '1'">
+                <a-cascader
+                  v-model="model.mpStatusData"
+                  :options="tagDataOptions"
+                  :display-render="displayRender"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择MP状态"
+                />
+              </template>
             </a-form-model-item>
           </a-col>
           <!-- 仪表状态开始 -->
@@ -184,8 +223,8 @@
             <a-form-model-item label="是否有旁路" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ifBypass">
               <a-radio-group name="radioGroup" v-model="model.ifBypass">
                 <!--  :default-value="model.ifBypass" -->
-                <a-radio :value="'1'"> 是 </a-radio>
                 <a-radio :value="'0'"> 否 </a-radio>
+                <a-radio :value="'1'"> 是 </a-radio>
               </a-radio-group>
             </a-form-model-item>
           </a-col>
@@ -217,7 +256,7 @@
         </a-row>
       </a-form-model>
     </j-form-container>
-  </a-spin>
+  <!-- </a-spin> -->
 </template>
 
 <script>
@@ -226,22 +265,38 @@
   export default {
     name: 'InterlockConditionForm',
     props: {
-      //表单禁用
-      // disabled: {
-      //   type: Boolean,
-      //   default: false,
-      //   required: false
-      // }
+      // 该系统设置的默认值
+      itSystemDefaultValue: {
+        type: Object,
+        default: function(){
+          return {} // 使用工厂函数返回默认值
+        }
+      },
+      // 所有位号
+      tagDataOptions: {
+        type: Array,
+        default: function(){
+          return [] // 使用工厂函数返回默认值
+        }
+      },
     },
     data () {
       return {
         model:{
-          instrumentStatusJuge: '0',
-          ifBypass: '1',
-          bypassNo: '0',
+          inputStatusRadio: '0', // 输入卡件状态单选默认-默认值
+          inputStatusDefault: null, // 输入卡件状态默认值默认参数
+          outputStatusRadio: '0', // 输出卡件状态单选默认-默认值
+          outputStatusDefault: null, // 输出卡件状态默认值默认参数
+          mpStatusRadio: '0', // MP状态单选默认-默认值
+          mpStatusDefault: null, // MP状态默认值默认参数
+          instrumentStatusJuge: '0', // 仪表判定依据-位号读取
+          instrumentStatus: null, // 仪表状态默认值默认参数
           upperLimit: null,
           lowerLimit: null,
           thresholdValueN: null,
+          ifBypass: '1', // 是否有旁路-是
+          bypassNo: '0', // 旁路默认值
+          bypass: null, // MP状态默认值默认参数
         },
         labelCol: {
           xs: { span: 24 },
@@ -251,7 +306,7 @@
           xs: { span: 24 },
           sm: { span: 16 },
         },
-        confirmLoading: true,
+        // confirmLoading: true,
         validatorRules: {
           interlockConditionData: [{
             required: true, message: '请选择联锁条件!',
@@ -304,18 +359,15 @@
           bypassNo: [{
             required: true, message: '请选择旁路状态!',
           }],
-          inputStatusData: [{
-            required: true, message: '请选择!',
-          }],
-          interlockConditionData: [{
-            required: true, message: '请选择输入卡件状态!',
-          }],
-          outputStatusData: [{
-            required: true, message: '请选择输出卡件状态!',
-          }],
-          mpStatusData: [{
-            required: true, message: '请选择MP状态!',
-          }],
+          // inputStatusData: [{
+          //   required: true, message: '请选择!',
+          // }],
+          // outputStatusData: [{
+          //   required: true, message: '请选择输出卡件状态!',
+          // }],
+          // mpStatusData: [{
+          //   required: true, message: '请选择MP状态!',
+          // }],
         },
         url: {
           interLockSelect: '/sys/dict/loadTreeData',
@@ -329,23 +381,32 @@
           value: 'info',
           children: 'children'
         },
-        tagDataOptions: [],
+        // tagDataOptions: [],
       }
     },
     created () {
-      this.getTagInfo()
+      // 设置状态默认值
+      this.setDefaultValue()
+      // this.getTagInfo()
        //备份model原始值
       this.modelDefault = JSON.parse(JSON.stringify(this.model));
     },
     methods: {
-      // 获取所有位号
-      getTagInfo(){
-        postAction(this.url.getTagInfo).then(res => {
-          console.log(res)
-          this.tagDataOptions = res.result
-          this.confirmLoading = false
-        })
+      // 设置状态默认值
+      setDefaultValue(){
+        console.log(this.itSystemDefaultValue)
+        this.model.inputStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormal
+        this.model.outputStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormal
+        this.model.mpStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormal
       },
+      // 获取所有位号
+      // getTagInfo(){
+      //   postAction(this.url.getTagInfo).then(res => {
+      //     console.log(res)
+      //     this.tagDataOptions = res.result
+      //     this.confirmLoading = false
+      //   })
+      // },
       displayRender({ labels }) {
         return labels[labels.length - 1];
       },
@@ -393,10 +454,13 @@
           this.model.bypassData = [record.bypassDeviceId, record.bypassModuleName, record.bypassTag+'&'+record.bypass]
         }
         // 输入卡件状态
+        this.model.inputStatusRadio = record.inputStatusTag ? '1' : '0'
         this.model.inputStatusData = [record.inputStatusDeviceId, record.inputStatusModuleName, record.inputStatusTag+'&'+record.inputStatus]
         // 输出卡件状态
+        this.model.outputStatusRadio = record.outputStatusTag ? '1' : '0'
         this.model.outputStatusData = [record.outputStatusDeviceId, record.outputStatusModuleName, record.outputStatusTag+'&'+record.outputStatus]
         // MP状态
+        this.model.mpStatusRadio = record.mpStatusTag ? '1' : '0'
         this.model.mpStatusData = [record.mpStatusDeviceId, record.mpStatusModuleName, record.mpStatusTag+'&'+record.mpStatus]
 
         this.visible = true;
@@ -453,22 +517,47 @@
             }
             
             // 输入卡件状态
-            this.model.inputStatusDeviceId = this.model.inputStatusData[0]
-            this.model.inputStatusModuleName = this.model.inputStatusData[1]
-            this.model.inputStatusTag = (this.model.inputStatusData[2].split('&'))[0]
-            this.model.inputStatus = (this.model.inputStatusData[2].split('&'))[1]
+            if(this.model.inputStatusRadio === '1' && this.model.inputStatusData && this.model.inputStatusData.length  > 0){
+              // 传位号
+              this.model.inputStatusDeviceId = this.model.inputStatusData[0]
+              this.model.inputStatusModuleName = this.model.inputStatusData[1]
+              this.model.inputStatusTag = (this.model.inputStatusData[2].split('&'))[0]
+              this.model.inputStatus = (this.model.inputStatusData[2].split('&'))[1]
+            } else {
+              console.log(11111111111111)
+              this.model.inputStatusDeviceId = null
+              this.model.inputStatusModuleName = null
+              this.model.inputStatusTag = null
+              this.model.inputStatus = this.model.inputStatusDefault
+            }
             
-            // 输出卡件状态 
-            this.model.outputStatusDeviceId = this.model.outputStatusData[0]
-            this.model.outputStatusModuleName = this.model.outputStatusData[1]
-            this.model.outputStatusTag = (this.model.outputStatusData[2].split('&'))[0]
-            this.model.outputStatus = (this.model.outputStatusData[2].split('&'))[1]
+            // 输出卡件状态
+            if(this.model.outputStatusRadio === '1' && this.model.outputStatusData && this.model.outputStatusData.length  > 0){
+              this.model.outputStatusDeviceId = this.model.outputStatusData[0]
+              this.model.outputStatusModuleName = this.model.outputStatusData[1]
+              this.model.outputStatusTag = (this.model.outputStatusData[2].split('&'))[0]
+              this.model.outputStatus = (this.model.outputStatusData[2].split('&'))[1]
+            } else {
+              console.log(1222222222)
+              this.model.outputStatusDeviceId = null
+              this.model.outputStatusModuleName = null
+              this.model.outputStatusTag = null
+              this.model.outputStatus = this.model.outputStatusDefault
+            }
 
             // MP状态
-            this.model.mpStatusDeviceId = this.model.mpStatusData[0]
-            this.model.mpStatusModuleName = this.model.mpStatusData[1]
-            this.model.mpStatusTag = (this.model.mpStatusData[2].split('&'))[0]
-            this.model.mpStatus = (this.model.mpStatusData[2].split('&'))[1]
+            if(this.model.mpStatusRadio === '1' && this.model.mpStatusData && this.model.mpStatusData.length  > 0){
+              this.model.mpStatusDeviceId = this.model.mpStatusData[0]
+              this.model.mpStatusModuleName = this.model.mpStatusData[1]
+              this.model.mpStatusTag = (this.model.mpStatusData[2].split('&'))[0]
+              this.model.mpStatus = (this.model.mpStatusData[2].split('&'))[1]
+            } else {
+              console.log(33333333)
+              this.model.mpStatusDeviceId = null
+              this.model.mpStatusModuleName = null
+              this.model.mpStatusTag = null
+              this.model.mpStatus = this.model.mpStatusDefault
+            }
             console.log(this.model)
             this.$emit('ok', this.model)
           }

+ 83 - 47
src/views/module_interLock/InterlockSummary/modules/InterlockSummaryForm.vue

@@ -142,9 +142,10 @@
           @ok="handleConditionOk"
           @cancel="handleConditionCancel"
           :width="800"
-          cancelText="关闭">
+          cancelText="关闭"
+          class="interlock-condition-form">
           <!-- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" -->
-          <interlock-condition-form ref="conditionForm" @ok="submitCallback"></interlock-condition-form>
+          <interlock-condition-form ref="conditionForm" :itSystemDefaultValue="itSystemDefaultValue" :tagDataOptions="tagDataOptions" @ok="submitCallback"></interlock-condition-form>
         </j-modal>
       </a-form-model>
     </j-form-container>
@@ -174,7 +175,7 @@
       addInterlock: {
         type: Object,
         default: function(){
-            return {} // 使用工厂函数返回默认值
+          return {} // 使用工厂函数返回默认值
         }
       },
     },
@@ -190,7 +191,7 @@
           xs: { span: 24 },
           sm: { span: 16 },
         },
-        confirmLoading: false,
+        confirmLoading: true,
         validatorRules: {
           interlockName: [
             { required: true, message: '请输入联锁名称!', },
@@ -277,17 +278,38 @@
           {
             title:'输入卡件状态',
             align:"center",
-            dataIndex: 'inputStatusTag'
+            dataIndex: 'inputStatusTag',
+            customRender: (text, record, index)=> {
+              if(record.inputStatusTag){
+                return record.inputStatusTag
+              } else {
+                return record.inputStatus
+              }
+            }
           },
           {
             title:'输出卡件状态',
             align:"center",
-            dataIndex: 'outputStatusTag'
+            dataIndex: 'outputStatusTag',
+            customRender: (text, record, index)=> {
+              if(record.outputStatusTag){
+                return record.outputStatusTag
+              } else {
+                return record.outputStatus
+              }
+            }
           },
           {
             title:'MP状态',
             align:"center",
-            dataIndex: 'mpStatusTag'
+            dataIndex: 'mpStatusTag',
+            customRender: (text, record, index)=> {
+              if(record.mpStatusTag){
+                return record.mpStatusTag
+              } else {
+                return record.mpStatus
+              }
+            }
           },
           {
             title: '操作',
@@ -299,6 +321,7 @@
           }
         ],
         tableClickRowIndex: -1,
+        itSystemDefaultValue: {}, // 该系统设置的默认值
       }
     },
     computed: {
@@ -312,35 +335,27 @@
     //   },
     // },
     created () {
-      console.log('弹窗', this.addInterlock)
       this.getTagInfo()
-      this.getData('0', 'apparatusData')
+      // this.getData('0', 'apparatusData')
        //备份model原始值
       this.modelDefault = JSON.parse(JSON.stringify(this.model));
     },
     methods: {
+      // 设置装置系统id并获取该系统默认设置值
+      getZzXtData(){
+        console.log('model', this.model)
+        getAction('/base/interlockBase/queryById', {id: this.model.interlockSystemId}).then(res => {
+          if(res.success){
+            this.itSystemDefaultValue = res.result
+          }
+        })
+      },
       // 获取所有位号
       getTagInfo(){
         postAction(this.url.getTagInfo).then(res => {
           console.log(res)
           this.tagDataOptions = res.result
-        })
-      },
-      // 获取装置/系统/联锁数据--默认获取装置数据
-      getData(pid, dataName){
-        let param = {
-          pid: pid,
-          tableName: 'interlock_base',
-          text: 'interlock_name',
-          code: 'id',
-          pidField: 'pid',
-          hasChildField: 'has_child',
-          condition: ''
-        }
-        getAction(this.url.interLockSelect,param).then(res=>{
-          if(res.success){
-            this[dataName] = res.result
-          }
+          this.confirmLoading = false
         })
       },
       // 联锁条件弹窗-取消
@@ -362,16 +377,6 @@
         }
         this.conditionVisible = false
       },
-      // 装置选择改变时
-      handleApparatusChange(e){
-        console.log(e)
-        this.getData(e, 'systemData')
-      },
-      // 系统选择改变时
-      handleSystemChange(e){
-        console.log(e)
-        this.getData(e, 'interLockData')
-      },
       interLockSearch(searchText){
         console.log(searchText)
         // this.interLockData = !searchText ? [] : [searchText, searchText.repeat(2), searchText.repeat(3)]
@@ -411,21 +416,26 @@
       },
       // 新增联锁-弹窗
       add () {
-        // this.edit(this.modelDefault);
         this.visible = true;
+        if(this.addInterlock && this.addInterlock.interlockType === '1'){
+          // 当前是新增-用树选择的装置系统进行赋值
+          this.model.interlockApparatusId = this.addInterlock.pid
+          this.model.interlockSystemId = this.addInterlock.id
+        }
+        this.getZzXtData()
       },
       // 编辑联锁-弹窗
       edit (record) {
         // this.model = Object.assign({}, record);
         // 编辑时获取当前联锁所有详细信息
         getAction(this.url.getLsAllData, {id: record.summaryid}).then(res => {
-          console.log(res)
           var resultArr = res.result
           this.model = resultArr
-          this.conditionDataSource = resultArr.interlockDetailEditQueryVOList
+          this.conditionDataSource = resultArr.interlockDetailEditQueryVOList // 表格数据
           this.model.interlockOutValueData = [resultArr.deviceId, resultArr.moduleName, resultArr.interlockOutValueTag+'&'+resultArr.interlockOutValue]
+          this.visible = true;
+          this.getZzXtData()
         })
-        this.visible = true;
       },
       submitForm () {
         const that = this;
@@ -446,12 +456,6 @@
               httpurl+=this.url.edit;
                method = 'put';
             }
-            // 装置系统id赋值
-            if(this.addInterlock && this.addInterlock.interlockType === '1'){
-              // 当前是新增-用树选择的装置系统进行赋值
-              this.model.interlockApparatusId = this.addInterlock.pid
-              this.model.interlockSystemId = this.addInterlock.id
-            }
             // 转换数据
             this.model.interlockDetailAddDTOList = this.conditionDataSource
             // 联锁输出值位号
@@ -459,6 +463,7 @@
             this.model.moduleName = this.model.interlockOutValueData[1]
             this.model.interlockOutValueTag = (this.model.interlockOutValueData[2].split('&'))[0]
             this.model.interlockOutValue = (this.model.interlockOutValueData[2].split('&'))[1]
+            console.log(this.model)
             httpAction(httpurl,this.model,method).then((res)=>{
               if(res.success){
                 that.$message.success(res.message);
@@ -470,9 +475,35 @@
               that.confirmLoading = false;
             })
           }
-
         })
       },
+      // 获取装置/系统/联锁数据--默认获取装置数据-方式一需要方法
+      // getData(pid, dataName){
+      //   let param = {
+      //     pid: pid,
+      //     tableName: 'interlock_base',
+      //     text: 'interlock_name',
+      //     code: 'id',
+      //     pidField: 'pid',
+      //     hasChildField: 'has_child',
+      //     condition: ''
+      //   }
+      //   getAction(this.url.interLockSelect,param).then(res=>{
+      //     if(res.success){
+      //       this[dataName] = res.result
+      //     }
+      //   })
+      // },
+      // 装置选择改变时-方式一需要方法
+      // handleApparatusChange(e){
+      //   console.log(e)
+      //   this.getData(e, 'systemData')
+      // },
+      // 系统选择改变时-方式一需要方法
+      // handleSystemChange(e){
+      //   console.log(e)
+      //   this.getData(e, 'interLockData')
+      // },
     }
   }
 </script>
@@ -496,4 +527,9 @@
     justify-content: space-between;
     align-items: center;
   }
+  .interlock-condition-form{
+    .ant-modal{
+      top: 4px;
+    }
+  }
 </style>

+ 1 - 26
src/views/module_interLock/interlockHistoryData/InterlockHistoryList.vue

@@ -80,10 +80,9 @@
         :pagination="ipagination"
         :loading="loading"
         class="j-table-force-nowrap"
-        :customRow="customRow"
         @change="handleTableChange">
         <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
-
+        
         <template slot="htmlSlot" slot-scope="text">
           <div v-html="text"></div>
         </template>
@@ -296,30 +295,6 @@
       },
     },
     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
-            },
-          }
-        }
-      },
       // 单元格点击事件
       customCellDetail(record, index, columnValue, columnTitle){
         return {

+ 1 - 1
src/views/module_interLock/interlockTimedReport/InterlockTimedReportList.vue

@@ -68,7 +68,6 @@
         ref="table"
         size="middle"
         :scroll="{x:true}"
-        bordered
         rowKey="id"
         :columns="columns"
         :dataSource="dataSource"
@@ -76,6 +75,7 @@
         :loading="loading"
         class="j-table-force-nowrap"
         @change="handleTableChange">
+        <!-- bordered -->
         <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
         <template slot="htmlSlot" slot-scope="text">