yuhan hace 7 meses
padre
commit
a2d9490315

+ 35 - 0
src/store/modules/interLock.js

@@ -0,0 +1,35 @@
+import Vue from 'vue'
+// import { ONL_AUTH_FIELDS } from "@/store/mutation-types"
+// import { getAction } from '@/api/manage'
+
+
+const interLock = {
+  state: {
+    //存储数据,用于组件之间的数据传输
+    summaryEditInfo: {},
+    summaryEditType: '新增',
+  },
+  // (大概)区别:mutations用来修改state数据 同步
+  mutations: {
+    SET_SUMMARYEDITINFO: (state, infos) => {
+      // console.log('fields',fields)
+      // Vue.set(state, 'baseInfos', fields)
+      state.summaryEditInfo = infos
+    },
+    SET_SUMMARYEDITTYPE: (state, infos) => {
+      // console.log('fields',fields)
+      // Vue.set(state, 'baseInfos', fields)
+      state.summaryEditType = infos
+    },
+  },
+  // (大概)区别:actions用来设计复杂逻辑 异步
+  actions: {
+    setSummaryEditInfo({ commit }, record) {
+      commit('SET_SUMMARYEDITINFO', record)
+    }
+    // this.$store.state.kzksInfo.baseInfos
+    // this.$store.dispatch('setWeituoBaseInfos', data)
+  }
+}
+
+export default interLock

+ 663 - 0
src/views/module_interLock/interlockSummaryAdd/InterlockConditionForm.vue

@@ -0,0 +1,663 @@
+<template>
+  <!-- <a-spin :spinning="confirmLoading"> -->
+    <j-form-container>
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-divider orientation="left"> <span>基本信息</span> </a-divider>
+          <a-col :span="24">
+            <a-form-model-item label="联锁条件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="interlockConditionData">
+              <a-cascader
+                v-model="model.interlockConditionData"
+                :options="tagDataOptions"
+                :fieldNames="customFieldNames"
+                expand-trigger="hover"
+                placeholder="请选择点位"/>
+                <!-- :display-render="displayRender" -->
+                <!-- @change="dianwerChange" -->
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="联锁设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="interlockSetValue">
+              <a-input v-model="model.interlockSetValue" placeholder="请输入联锁设定值"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="当前值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentValueData">
+              <a-cascader
+                v-model="model.currentValueData"
+                :options="tagDataOptions"
+                :fieldNames="customFieldNames"
+                expand-trigger="hover"
+                placeholder="请选择当前值"/>
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item label="输入卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inputStatusData">
+              <a-radio-group name="radioGroup" v-model="model.inputStatusRadio" @change="statusRadioChange">
+                <a-radio :value="'0'"> 默认正常 </a-radio>
+                <a-radio :value="'1'"> 位号读取 </a-radio>
+              </a-radio-group>
+              <template v-if="model.inputStatusRadio === '0'">
+                <a-input v-model="model.inputStatusDefault" disabled></a-input>
+              </template>
+              <template v-if="model.inputStatusRadio === '1'">
+                <a-cascader
+                  v-model="model.inputStatusData"
+                  :options="tagDataOptions"
+                  :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-radio-group name="radioGroup" v-model="model.outputStatusRadio" @change="statusRadioChange">
+                <a-radio :value="'0'"> 默认正常 </a-radio>
+                <a-radio :value="'1'"> 位号读取 </a-radio>
+              </a-radio-group>
+              <template v-if="model.outputStatusRadio === '0'">
+                <a-input v-model="model.outputStatusDefault" disabled></a-input>
+              </template>
+              <template v-if="model.outputStatusRadio === '1'">
+                <a-cascader
+                  v-model="model.outputStatusData"
+                  :options="tagDataOptions"
+                  :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-radio-group name="radioGroup" v-model="model.mpStatusRadio" @change="statusRadioChange">
+                <a-radio :value="'0'"> 默认正常 </a-radio>
+                <a-radio :value="'1'"> 位号读取 </a-radio>
+              </a-radio-group>
+              <template v-if="model.mpStatusRadio === '0'">
+                <a-input v-model="model.mpStatusDefault" disabled></a-input>
+              </template>
+              <template v-if="model.mpStatusRadio === '1'">
+                <a-cascader
+                  v-model="model.mpStatusData"
+                  :options="tagDataOptions"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择MP状态"
+                />
+              </template>
+            </a-form-model-item>
+          </a-col>
+          <!-- 仪表状态开始 -->
+          <a-divider orientation="left"> <span>仪表状态</span> </a-divider>
+          <a-col :span="24">
+            <a-form-model-item label="仪表状态判定依据" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatusJuge">
+              <a-radio-group name="radioGroup" v-model="model.instrumentStatusJuge">
+                <!-- @change="instrumentStatusJugeChange" -->
+                <a-radio :value="'3'"> 默认正常 </a-radio>
+                <a-radio :value="'0'"> 位号读取 </a-radio>
+                <a-radio :value="'1'"> 高低限判断 </a-radio>
+                <a-radio :value="'2'"> 突变超限判断 </a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="model.instrumentStatusJuge === '3'">
+            <a-col :span="24">
+              <a-input v-model="model.instrumentStatusDefault" disabled></a-input>
+            </a-col>
+          </template>
+          <template v-if="model.instrumentStatusJuge === '0'">
+            <a-col :span="24">
+              <a-form-model-item label="仪表位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatusData">
+                <a-cascader
+                v-model="model.instrumentStatusData"
+                :options="tagDataOptions"
+                :fieldNames="customFieldNames"
+                expand-trigger="hover"
+                placeholder="请选择仪表位号"/>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <template v-if="model.instrumentStatusJuge === '1'">
+            <a-col :span="24">
+              <a-form-model-item label="原始模拟量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ysmnlData">
+                <a-cascader
+                  v-model="model.ysmnlData"
+                  :options="tagDataOptions"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择原始模拟量"
+                />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="系统" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentGDXT">
+                <a-radio-group name="radioGroup" v-model="model.instrumentGDXT" @change="instrumentGDXTChange">
+                  <a-radio value="Tricon"> Tricon </a-radio>
+                  <a-radio value="TSxPlus"> TSxPlus </a-radio>
+                </a-radio-group>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="高限值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimitGd">
+                <!-- <a-auto-complete :data-source="['4258', '61948']" v-model="model.upperLimit" placeholder="请输入高限"></a-auto-complete> -->
+                <a-input v-model="model.upperLimitGd" placeholder="请输入高限"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="低限值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimitGd">
+                <!-- <a-auto-complete :data-source="['737', '10722']" v-model="model.lowerLimit" placeholder="请输入低限"></a-auto-complete> -->
+                <a-input v-model="model.lowerLimitGd" placeholder="请输入低限"></a-input>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <template v-if="model.instrumentStatusJuge === '2'">
+            <a-col :span="24">
+              <a-form-model-item label="原始模拟量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ysmnlData">
+                <a-cascader
+                  v-model="model.ysmnlData"
+                  :options="tagDataOptions"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择原始模拟量"
+                />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="系统" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentTBXT">
+                <a-radio-group name="radioGroup" v-model="model.instrumentTBXT" @change="instrumentTBXTChange">
+                  <a-radio value="Tricon"> Tricon </a-radio>
+                  <a-radio value="TSxPlus"> TSxPlus </a-radio>
+                </a-radio-group>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="突变判断公式" :labelCol="labelCol" :wrapperCol="wrapperCol" class="red-star-form-item">
+                <div style="display: flex;">
+                  <div style="width: 30px;text-align: center;">( </div>
+                  <a-form-model-item prop="upperLimitTb">
+                    <!-- <a-auto-complete :data-source="['4095', '59577']" v-model="model.upperLimit" placeholder="请输入高限"></a-auto-complete> -->
+                    <a-input v-model="model.upperLimitTb" placeholder="请输入高限"></a-input>
+                  </a-form-model-item>
+                  <div style="width: 30px;text-align: center;"> - </div>
+                  <a-form-model-item prop="lowerLimitTb">
+                    <!-- <a-auto-complete :data-source="['819', '11915']" v-model="model.lowerLimit" placeholder="请输入低限"></a-auto-complete> -->
+                    <a-input v-model="model.lowerLimitTb" placeholder="请输入低限"></a-input>
+                  </a-form-model-item>
+                  <div style="width: 60px;text-align: center;">)* </div>
+                  <a-form-model-item prop="thresholdValueN">
+                    <a-input v-model="model.thresholdValueN" placeholder="请输入阈值"></a-input>
+                    <!-- <a-auto-complete :data-source="['1']" v-model="model.thresholdValueN" placeholder="请输入阈值"></a-auto-complete> -->
+                  </a-form-model-item>
+                  <div style="width: 30px;text-align: center;"> % </div>
+                </div>
+              </a-form-model-item>
+            </a-col>
+            <!-- <a-col :span="24">
+              <a-form-model-item label="高限值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
+                <a-input v-model="model.upperLimit" placeholder="请输入高限"></a-input>
+            </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="低限值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimit">
+                <a-input v-model="model.lowerLimit" placeholder="请输入低限"></a-input>
+              </a-form-model-item>
+            </a-col> -->
+            <!-- <a-col :span="24"> -->
+              <!-- <a-form-model-item label="阈值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thresholdValueN">
+                <a-input v-model="model.thresholdValueN" suffix="%" placeholder="请输入阈值"></a-input> -->
+                <!-- addon-after="%" -->
+              <!-- </a-form-model-item> -->
+            <!-- </a-col> -->
+            <a-col :span="24">
+              <a-form-model-item label="突变判断时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thresholdTime">
+                <a-input v-model="model.thresholdTime" suffix="S" placeholder="请输入时间"></a-input>
+                <!-- suffix="S" -->
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :span="24">
+            <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
+              <a-input v-model="model.description" placeholder="请输入描述"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- 仪表状态结束 -->
+
+          <!-- 是否旁路 -->
+          <a-divider orientation="left"> <span>旁路状态</span> </a-divider>
+          <a-col :span="24">
+            <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="'0'"> 否 </a-radio>
+                <a-radio :value="'1'"> 是 </a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="model.ifBypass === '1'">
+            <a-col :span="24">
+              <a-form-model-item label="旁路" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypassData">
+                <a-cascader
+                v-model="model.bypassData"
+                :options="tagDataOptions"
+                :fieldNames="customFieldNames"
+                expand-trigger="hover"
+                placeholder="请选择旁路"/>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <template v-if="model.ifBypass === '0'">
+            <a-col :span="24">
+              <a-form-model-item label="旁路状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypassNo">
+                <!-- <a-input v-model="model.bypassNo" disabled></a-input> -->
+                <!-- placeholder="无旁路" :default-value="bypassNo" -->
+                <a-select v-model="model.bypassNo">
+                  <a-select-option :value="item.value" v-for="item in byPassOptions" :key="item.value"> {{ item.title }} </a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+          </template>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  <!-- </a-spin> -->
+</template>
+
+<script>
+  import { httpAction, getAction, postAction } from '@/api/manage'
+
+  export default {
+    name: 'InterlockConditionForm',
+    props: {
+      // 该系统设置的默认值
+      itSystemDefaultValue: {
+        type: Object,
+        default: function(){
+          return {} // 使用工厂函数返回默认值
+        }
+      },
+      // 所有位号
+      tagDataOptions: {
+        type: Array,
+        default: function(){
+          return [] // 使用工厂函数返回默认值
+        }
+      },
+    },
+    data () {
+      return {
+        model:{
+          inputStatusRadio: '0', // 输入卡件状态单选默认-默认值
+          inputStatusDefault: null, // 输入卡件状态默认值默认参数
+          outputStatusRadio: '0', // 输出卡件状态单选默认-默认值
+          outputStatusDefault: null, // 输出卡件状态默认值默认参数
+          mpStatusRadio: '0', // MP状态单选默认-默认值
+          mpStatusDefault: null, // MP状态默认值默认参数
+          instrumentStatusJuge: '3', // 仪表判定依据-默认正常
+          instrumentStatusDefault: null, // 仪表状态默认值默认参数
+          instrumentGDXT: '',
+          instrumentTBXT: '',
+          upperLimitGd: null,
+          lowerLimitGd: null,
+          upperLimitTb: null,
+          lowerLimitTb: null,
+          thresholdValueN: '1',
+          ifBypass: '1', // 是否有旁路-是
+          bypassNo: null, // 旁路默认值
+          bypass: null, // MP状态默认值默认参数
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        // confirmLoading: true,
+        validatorRules: {
+          interlockConditionData: [{
+            required: true, message: '请选择联锁条件!',
+          }],
+          // instrumentStatusJuge: [{
+          //   required: true, message: '请选择仪表状态判定依据!',
+          // }],
+          instrumentStatusData: [{
+            required: true, message: '请选择仪表状态!',
+          }],
+          // 高低限
+          ysmnlData: [{
+            required: true, message: '请选择原始模拟量!',
+          }],
+          upperLimitGd: [{
+            required: true, message: '请输入高限值!',
+          }],
+          lowerLimitGd: [{
+            required: true, message: '请输入低限值!',
+          }],
+          upperLimitTb: [{
+            required: true, message: '请输入高限值!',
+          }],
+          lowerLimitTb: [{
+            required: true, message: '请输入低限值!',
+          }],
+          // 突变超限
+          tbGongshi: [
+            // { required: true, message: '', },
+            { required: true, message: '请输入高限值!', },
+            { required: true, message: '请输入低限值!', },
+            { required: true, message: '请输入阈值!', },
+          ],
+          thresholdTime: [{
+            required: true, message: '请输入时间!',
+          }],
+          thresholdValueN: [{
+            required: true, message: '请输入阈值!',
+          }],
+
+          // interlockSetValue: [{
+          //   required: true, message: '请输入联锁设定值!',
+          // }],
+          // currentValueData: [{
+          //   required: true, message: '请选择当前值!',
+          // }],
+          ifBypass: [{
+            required: true, message: '请选择是否旁路!',
+          }],
+          bypassData: [{
+            required: true, message: '请选择旁路!',
+          }],
+          bypassNo: [{
+            required: true, message: '请选择旁路状态!',
+          }],
+          // inputStatusData: [{
+          //   required: true, message: '请选择!',
+          // }],
+          // outputStatusData: [{
+          //   required: true, message: '请选择输出卡件状态!',
+          // }],
+          // mpStatusData: [{
+          //   required: true, message: '请选择MP状态!',
+          // }],
+        },
+        url: {
+          interLockSelect: '/sys/dict/loadTreeData',
+          add: "/summary/interlockSummary/add",
+          edit: "/summary/interlockSummary/edit",
+          queryById: "/summary/interlockSummary/queryById",
+          getTagInfo: "/iotedgeCollectData/iotedgeCollectData/getTagInfo"
+        },
+        customFieldNames: {
+          label: 'name',
+          value: 'info',
+          children: 'children'
+        },
+        // tagDataOptions: [],
+      }
+    },
+    created () {
+      // this.getTagInfo()
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      statusRadioChange(e){
+      //   console.log(e)
+      //   console.log(this.model.inputStatusRadio)
+        // this.$set(this.model, 'inputStatusRadio', e.target.value)
+        this.model = {...this.model}
+      },
+      // 设置状态默认值和初始化值
+      setDefaultValue(){
+        // this.$set(this.model, 'inputStatusDefault', this.itSystemDefaultValue.controlSystemStatusNormal)
+        var controlSystemStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormalName +'('+ this.itSystemDefaultValue.controlSystemStatusNormal+')'
+        this.model.inputStatusDefault = controlSystemStatusDefault
+        this.model.outputStatusDefault = controlSystemStatusDefault
+        this.model.mpStatusDefault = controlSystemStatusDefault
+        // 仪表状态
+        this.model.instrumentStatusDefault = this.itSystemDefaultValue.instrumentStatusNormalName +'('+ this.itSystemDefaultValue.instrumentStatusNormal+')'
+        // 旁路状态
+        this.byPassOptions = []
+        this.byPassOptions.push({
+          value: this.itSystemDefaultValue.bypassYes,
+          title: this.itSystemDefaultValue.bypassYesName +'('+ this.itSystemDefaultValue.bypassYes +')'
+        })
+        var noNormal = this.itSystemDefaultValue.bypassYes === '0' ? '1' : '0'
+        this.byPassOptions.push({
+          value: noNormal,
+          title: this.itSystemDefaultValue.bypassNoName +'('+ noNormal +')'
+        })
+        // this.model.bypassNo = this.itSystemDefaultValue.bypassYesName +'('+ this.itSystemDefaultValue.bypassYes +')'
+        // 初始化
+        this.model.thresholdValueN = '1'
+      },
+      // 获取所有位号
+      // getTagInfo(){
+      //   postAction(this.url.getTagInfo).then(res => {
+      //     console.log(res)
+      //     this.tagDataOptions = res.result
+      //     this.confirmLoading = false
+      //   })
+      // },
+      // displayRender({ labels }) {
+      //   // 设置显示最有一位
+      //   return labels[labels.length - 1];
+      // },
+      // 点位选择改变
+      dianwerChange(e){
+        console.log(e)
+      },
+      // 点位状态依据改变时
+      // instrumentStatusJugeChange(e){
+      //   console.log(e)
+      //   this.model.upperLimit = null
+      //   this.model.lowerLimit = null
+      // },
+      // 高低限判断系统参考改变
+      instrumentGDXTChange(e){
+        if(e.target.value === 'Tricon'){
+          this.model.upperLimitGd = '4258'
+          this.model.lowerLimitGd = '737'
+        }
+        if(e.target.value === 'TSxPlus'){
+          this.model.upperLimitGd = '61948'
+          this.model.lowerLimitGd = '10722'
+        }
+      },
+      instrumentTBXTChange(e){
+        if(e.target.value === 'Tricon'){
+          this.model.upperLimitTb = '4095'
+          this.model.lowerLimitTb = '819'
+        }
+        if(e.target.value === 'TSxPlus'){
+          this.model.upperLimitTb = '59577'
+          this.model.lowerLimitTb = '11915'
+        }
+      },
+      add () {
+        // 设置状态默认值
+        this.setDefaultValue()
+      },
+      edit (record) {
+        // console.log(record)
+        this.model = Object.assign({}, record);
+        // 联锁条件
+        this.model.interlockConditionData = [record.interlockConditionDeviceId, record.interlockConditionModuleName, record.interlockConditionTag+'&'+record.interlockCondition]
+        // 仪表状态
+        if(record.instrumentStatusJuge === '0'){
+          // 仪表状态-仪表状态位号
+          this.model.instrumentStatusData = [record.instrumentStatusDeviceId, record.instrumentStatusModuleName, record.instrumentStatusTag+'&'+record.instrumentStatusValue]
+        }
+        if(this.model.instrumentStatusJuge === '1' || this.model.instrumentStatusJuge === '2'){
+          // 仪表状态-原始模拟量位号
+          this.model.ysmnlData = [record.ysmnlDeviceId, record.ysmnlModuleName, record.ysmnlTag+'&'+record.ysmnlValue]
+        }
+        if(this.model.instrumentStatusJuge === '1'){
+          // 高低限赋值--依据转换后还保持刚刚的选择
+          this.model.upperLimitGd = record.upperLimit
+          this.model.lowerLimitGd = record.lowerLimit
+        }
+        if(this.model.instrumentStatusJuge === '2'){
+          this.model.upperLimitTb = record.upperLimit
+          this.model.lowerLimitTb = record.lowerLimit
+          // 仪表状态-阈值Math.round解决相乘会出现很多小数的情况
+          this.model.thresholdValueN = Math.round(parseInt(record.thresholdValue)*100)
+          // this.model.thresholdValueN = (parseInt(record.thresholdValue)*100).toFixed(0)
+        }
+        // 当前值
+        // this.model.currentValueData = [record.currentValueDeviceId, record.currentValueModuleName, record.currentValueTag+'&'+record.currentValue]
+        // 旁路
+        if(record.ifBypass === '0'){
+          this.model.bypassNo = record.bypass
+        }
+        if(record.ifBypass === '1'){
+          this.model.bypassNo = '0'
+          this.model.bypassData = [record.bypassDeviceId, record.bypassModuleName, record.bypassTag+'&'+record.bypass]
+        }
+        // 输入卡件状态
+        this.model.inputStatusRadio = record.inputStatusTag ? '1' : '0'
+        if(record.inputStatusTag){
+          this.model.inputStatusData = [record.inputStatusDeviceId, record.inputStatusModuleName, record.inputStatusTag+'&'+record.inputStatus]
+        }
+        // 输出卡件状态
+        this.model.outputStatusRadio = record.outputStatusTag ? '1' : '0'
+        if(record.outputStatusTag){
+          this.model.outputStatusData = [record.outputStatusDeviceId, record.outputStatusModuleName, record.outputStatusTag+'&'+record.outputStatus]
+        }
+        // MP状态
+        this.model.mpStatusRadio = record.mpStatusTag ? '1' : '0'
+        if(record.mpStatusTag){
+          this.model.mpStatusRadio = '1'
+          this.model.mpStatusData = [record.mpStatusDeviceId, record.mpStatusModuleName, record.mpStatusTag+'&'+record.mpStatus]
+        }
+        this.setDefaultValue()
+      },
+      submitForm () {
+        // const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            // 拆分级联选择器的数据传递后端使用-设备id、模块名称、点位、值
+            // var conditionTableData = {}
+            // 联锁条件
+            this.model.interlockConditionDeviceId = this.model.interlockConditionData[0]
+            this.model.interlockConditionModuleName = this.model.interlockConditionData[1]
+            this.model.interlockConditionTag = (this.model.interlockConditionData[2].split('&'))[0]
+            this.model.interlockCondition = (this.model.interlockConditionData[2].split('&'))[1]
+            // 仪表状态
+            if(this.model.instrumentStatusJuge === '0'){
+              // 仪表状态-仪表状态位号
+              this.model.instrumentStatusDeviceId = this.model.instrumentStatusData[0]
+              this.model.instrumentStatusModuleName = this.model.instrumentStatusData[1]
+              this.model.instrumentStatusTag = (this.model.instrumentStatusData[2].split('&'))[0]
+              this.model.instrumentStatusValue = (this.model.instrumentStatusData[2].split('&'))[1]
+            }
+            if(this.model.instrumentStatusJuge === '1' || this.model.instrumentStatusJuge === '2'){
+              // 仪表状态-原始模拟量位号
+              this.model.ysmnlDeviceId = this.model.ysmnlData[0]
+              this.model.ysmnlModuleName = this.model.ysmnlData[1]
+              this.model.ysmnlTag = (this.model.ysmnlData[2].split('&'))[0]
+              this.model.ysmnlValue = (this.model.ysmnlData[2].split('&'))[1]
+            }
+            if(this.model.instrumentStatusJuge === '1'){
+              // 根据状态给后端高低限赋值
+              this.model.upperLimit = this.model.upperLimitGd
+              this.model.lowerLimit = this.model.lowerLimitGd
+            }
+            if(this.model.instrumentStatusJuge === '2'){
+              this.model.upperLimit = this.model.upperLimitTb
+              this.model.lowerLimit = this.model.lowerLimitTb
+              // 仪表状态-阈值--设置thresholdValueN是防止自身转换出现问题
+              this.model.thresholdValue = parseInt(this.model.thresholdValueN)/100
+            }
+            
+            // 当前值
+            // this.model.currentValueDeviceId = this.model.currentValueData[0]
+            // this.model.currentValueModuleName = this.model.currentValueData[1]
+            // this.model.currentValueTag = (this.model.currentValueData[2].split('&'))[0]
+            // this.model.currentValue = (this.model.currentValueData[2].split('&'))[1]
+
+            // 旁路位号
+            if(this.model.ifBypass === '0'){
+              // 否
+              // this.model.bypass = this.model.bypassNo
+              this.model.bypass = this.itSystemDefaultValue.bypassYes
+            }
+            if(this.model.ifBypass === '1'){
+              // 是
+              this.model.bypassDeviceId = this.model.bypassData[0]
+              this.model.bypassModuleName = this.model.bypassData[1]
+              this.model.bypassTag = (this.model.bypassData[2].split('&'))[0]
+              this.model.bypass = (this.model.bypassData[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 {
+              this.model.inputStatusDeviceId = null
+              this.model.inputStatusModuleName = null
+              this.model.inputStatusTag = null
+              // 由于需要变成正常(0)的状态,且默认是正常,所以直接用系统的正常状态赋值
+              // 如果需要改成下拉选择,就得换个方式写了
+              // this.model.inputStatus = this.model.inputStatusDefault
+              this.model.inputStatus = this.itSystemDefaultValue.controlSystemStatusNormal
+            }
+            
+            // 输出卡件状态
+            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 {
+              this.model.outputStatusDeviceId = null
+              this.model.outputStatusModuleName = null
+              this.model.outputStatusTag = null
+              this.model.outputStatus = this.itSystemDefaultValue.controlSystemStatusNormal
+            }
+
+            // MP状态
+            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 {
+              this.model.mpStatusDeviceId = null
+              this.model.mpStatusModuleName = null
+              this.model.mpStatusTag = null
+              this.model.mpStatus = this.itSystemDefaultValue.controlSystemStatusNormal
+            }
+            console.log(this.model)
+            this.$emit('ok', this.model)
+          }
+         
+        })
+      },
+    }
+  }
+</script>
+<style lang="less">
+  .red-star-form-item{
+    margin-bottom: 0;
+    .ant-form-item-label {
+      ::before {
+        display: inline-block;
+        margin-right: 4px;
+        color: #ff4d4f;
+        font-size: 14px;
+        font-family: SimSun, sans-serif;
+        line-height: 1;
+        content: '*';
+      }
+    }
+  }
+</style>

+ 575 - 0
src/views/module_interLock/interlockSummaryAdd/InterlockSummaryAdd.vue

@@ -0,0 +1,575 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <div class="u-flex-jab">
+      <div>
+        <a-icon type="arrow-left" @click="goBack"/>
+        <span>{{ summaryEditType }}</span>
+      </div>
+      <div>
+        <a-button @click="goBack">关闭</a-button>
+        <a-button @click="submitForm" type="primary">提交</a-button>
+      </div>
+    </div>
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <div class="interlock-summary-item">
+          <div class="interlock-summary-item-title">联锁基本信息</div>
+          <a-row>
+            <a-col :span="12">
+              <a-form-model-item label="联锁名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="interlockName">
+                <a-input v-model="model.interlockName" placeholder="请输入联锁名称"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+                <a-input v-model="model.remark" placeholder="请输入备注"></a-input>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </div>
+        <!-- 联锁条件信息 -->
+        <div class="interlock-summary-item" style="padding-bottom: 12px;">
+          <div class="interlock-summary-item-title u-flex-jab">
+            <div>联锁条件信息</div>
+            <a-button @click="handleAddCondition" type="primary" icon="plus">新增联锁条件</a-button>
+          </div>
+          <a-row>
+            <a-col :span="12">
+              <a-form-model-item label="逻辑关系" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ljgx">
+                <!-- <a-input v-model="model.ljgx" placeholder="请输入逻辑关系"></a-input> -->
+                <!-- <j-dict-select-tag v-model="model.ljgx"  placeholder="请选择操作类型" dictCode="ljgx"/> -->
+                <a-auto-complete :data-source="ljgxOptions" v-model="model.ljgx" placeholder="请设置逻辑关系"></a-auto-complete>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <!-- 联锁条件表格 -->
+          <a-table
+            ref="table"
+            size="middle"
+            :scroll="{x:true}"
+            :pagination="false"
+            :rowKey="(record,index)=>{return index}"
+            :columns="columns"
+            :dataSource="conditionDataSource"
+            class="j-table-force-nowrap"
+            style="margin: 0 12px;">
+            <!-- 仪表状态依据 -->
+            <span slot="instrumentStatusJuge" slot-scope="text, record">
+              <template v-if="record.instrumentStatusJuge === '3'">
+                <span>默认正常</span>
+              </template>
+              <template v-if="record.instrumentStatusJuge === '0'">
+                <span>位号读取</span>
+              </template>
+              <template v-if="record.instrumentStatusJuge === '1'">
+                <span>高低限判断</span>
+              </template>
+              <template v-if="record.instrumentStatusJuge === '2'">
+                <span>突变超限判断</span>
+              </template>
+            </span>
+            <!-- 仪表状态内容 -->
+            <span slot="instrumentStatusContent" slot-scope="text, record">
+              <template v-if="record.instrumentStatusJuge === '3'">
+                <span>{{ record.instrumentStatusTag }}</span>
+              </template>
+              <template v-if="record.instrumentStatusJuge === '0'">
+                <span>位号:{{ record.instrumentStatusTag }}</span>
+              </template>
+              <template v-if="record.instrumentStatusJuge === '1'">
+                <span>位号:{{ record.ysmnlTag }}</span><br/>
+                <span>
+                  <span>高限值:{{ record.upperLimit }}</span>&nbsp;
+                  <span>低限值:{{ record.lowerLimit }}</span>
+                </span>
+              </template>
+              <template v-if="record.instrumentStatusJuge === '2'">
+                <span>位号:{{ record.ysmnlTag }}</span><br/>
+                <span>
+                  <span>高限值:{{ record.upperLimit }}</span> &nbsp;
+                  <span>低限值:{{ record.lowerLimit }}</span>
+                </span><br/>
+                <span>
+                  <span>时间:{{ record.thresholdTime }}</span>&nbsp;
+                  <span>阈值:{{ record.thresholdValue }}</span>
+                </span>
+              </template>
+            </span>
+            <!-- 是否旁路 -->
+            <span slot="ifBypass" slot-scope="text, record">
+              <span v-if="record.ifBypass === '1'">{{ record.bypassTag }}</span>
+              <span v-if="record.ifBypass === '0'">{{ (record.bypassYesName?record.bypassYesName:itSystemDefaultValue.bypassYesName)+'('+record.bypass+')' }}</span>
+            </span>
+            <!-- 操作 -->
+            <span slot="action" slot-scope="text, record, index">
+              <a-tooltip>
+                <template slot="title"> 设置 </template>
+                <span class="edit-btn" @click="handleEditCondition(record, index)"></span>
+              </a-tooltip>
+              <a-tooltip>
+                <template slot="title"> 复制 </template>
+                <span class="copy-btn" @click="handleCopyCondition(record, index)"></span>
+              </a-tooltip>
+              <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteCondition(record, index)">
+                <a-tooltip>
+                  <template slot="title"> 删除 </template>
+                  <span class="delete-btn"></span>
+                </a-tooltip>
+              </a-popconfirm>
+            </span>
+          </a-table>
+        </div>
+        <!-- 联锁输出 -->
+        <div class="interlock-summary-item">
+          <div class="interlock-summary-item-title">联锁输出</div>
+          <a-row>
+            <a-col :span="12">
+              <a-form-model-item label="联锁输出值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="interlockOutValueData">
+                <a-cascader
+                  v-model="model.interlockOutValueData"
+                  :options="tagDataOptions"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择"
+                  @change="dianwerChange"
+                  />
+                  <!-- :display-render="displayRender" -->
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </div>
+        <!-- 新增联锁条件 -->
+        <j-modal
+          :title="conditionTitle"
+          :visible="conditionVisible"
+          @ok="handleConditionOk"
+          @cancel="handleConditionCancel"
+          :width="800"
+          cancelText="关闭"
+          class="interlock-condition-form">
+          <!-- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" -->
+          <interlock-condition-form ref="conditionForm" :itSystemDefaultValue="itSystemDefaultValue" :tagDataOptions="tagDataOptions" @ok="submitCallback"></interlock-condition-form>
+        </j-modal>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+  import { httpAction, getAction, postAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  import InterlockConditionForm from './InterlockConditionForm.vue'
+  import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
+  // import { mixinDevice } from '@/utils/mixin'
+  // import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: 'InterlockSummaryForm',
+    // mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      InterlockConditionForm
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      addInterlock: {
+        type: Object,
+        default: function(){
+          return {} // 使用工厂函数返回默认值
+        }
+      },
+    },
+    data () {
+      return {
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: true,
+        validatorRules: {
+          interlockName: [
+            { required: true, message: '请输入联锁名称!', },
+            { validator: (rule, value, callback) => validateDuplicateValue('interlock_summary	', 'interlock_name', value, this.model.id, callback)},
+          ],
+          // ljgx: [{
+          //   required: true, message: '请输入逻辑关系!',
+          // }],
+          // interlockOutValueData: [{
+          //   required: true, message: '请选择联锁输出值!',
+          // }],
+        },
+        url: {
+          interLockSelect: '/sys/dict/loadTreeData',
+          add: "/summary/interlockSummary/addLS",
+          edit: "/summary/interlockSummary/editLS",
+          queryById: "/summary/interlockSummary/queryById",
+          getLsAllData: "/summary/interlockSummary/xxxxLS",
+          getTagInfo: "/iotedgeCollectData/iotedgeCollectData/getTagInfo",
+        },
+        customFieldNames: {
+          label: 'name',
+          value: 'info',
+          children: 'children'
+        },
+        apparatusData: [],
+        systemData: [],
+        interLockData: [],
+        // 设备-模块-位号
+        tagDataOptions: [],
+        // 新增联锁条件
+        conditionTitle: '设置联锁条件',
+        conditionVisible: false,
+        // 联锁条件表格
+        conditionDataSource: [],
+        columns: [
+          // {
+          //   title: '序号',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'联锁条件',
+            align:"center",
+            dataIndex: 'interlockConditionTag'
+          },
+          {
+            title:'仪表状态依据',
+            align:"center",
+            // dataIndex: 'instrumentStatusJuge',
+            scopedSlots: { customRender: 'instrumentStatusJuge' }
+          },
+          {
+            title:'仪表状态内容',
+            align:"center",
+            // dataIndex: 'instrumentStatusTag',
+            scopedSlots: { customRender: 'instrumentStatusContent' }
+          },
+          {
+            title:'描述',
+            align:"center",
+            dataIndex: 'description'
+          },
+          {
+            title:'联锁设定值',
+            align:"center",
+            dataIndex: 'interlockSetValue'
+          },
+          // {
+          //   title:'当前值',
+          //   align:"center",
+          //   dataIndex: 'currentValueTag'
+          // },
+          {
+            title:'旁路状态',
+            align:"center",
+            scopedSlots: { customRender: 'ifBypass' }
+          },
+          {
+            title:'输入卡件状态',
+            align:"center",
+            dataIndex: 'inputStatusTag',
+            customRender: (text, record, index)=> {
+              if(record.inputStatusTag){
+                return record.inputStatusTag
+              } else {
+                var name = record.controlSystemStatusNormalName ? record.controlSystemStatusNormalName : this.itSystemDefaultValue.controlSystemStatusNormalName
+                return name +'('+ record.inputStatus+')'
+              }
+            }
+          },
+          {
+            title:'输出卡件状态',
+            align:"center",
+            dataIndex: 'outputStatusTag',
+            customRender: (text, record, index)=> {
+              if(record.outputStatusTag){
+                return record.outputStatusTag
+              } else {
+                var name = record.controlSystemStatusNormalName ? record.controlSystemStatusNormalName : this.itSystemDefaultValue.controlSystemStatusNormalName
+                return name +'('+ record.outputStatus+')'
+              }
+            }
+          },
+          {
+            title:'MP状态',
+            align:"center",
+            dataIndex: 'mpStatusTag',
+            customRender: (text, record, index)=> {
+              if(record.mpStatusTag){
+                return record.mpStatusTag
+              } else {
+                var name = record.controlSystemStatusNormalName ? record.controlSystemStatusNormalName : this.itSystemDefaultValue.controlSystemStatusNormalName
+                return name +'('+ record.mpStatus+')'
+              }
+            }
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        tableClickRowIndex: -1,
+        itSystemDefaultValue: {}, // 该系统设置的默认值
+        ljgxOptions: [],
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+      summaryEditInfo() {
+        return this.$store.getters.summaryEditInfo
+      },
+      summaryEditType() {
+        return this.$store.getters.summaryEditType
+      },
+    },
+    // watch: {
+    //   'model.interlockName'(val) {
+    //     console.log('value', val);
+    //   },
+    // },
+    created () {
+      this.loadData()
+      this.getTagInfo()
+      this.initDictData()
+      // this.getData('0', 'apparatusData')
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      goBack(){
+        this.$router.go(-1)
+        // this.$router.push({path: '/interLock/summary'})
+      },
+      // 获取逻辑关系字典
+      initDictData() {
+        //优先从缓存中读取字典配置
+        if(getDictItemsFromCache('ljgx')){
+          var dicts = getDictItemsFromCache('ljgx');
+          this.ljgxOptions = dicts.map(item => item.label)
+          return
+        }
+        //根据字典Code, 初始化字典数组
+        ajaxGetDictItems('ljgx', null).then((res) => {
+          if (res.success) {
+            var dicts = res.result;
+            this.ljgxOptions = dicts.map(item => item.label)
+          }
+        })
+      },
+      // 设置装置系统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 => {
+          this.tagDataOptions = res.result
+          this.confirmLoading = false
+        })
+      },
+      // 联锁条件弹窗-取消
+      handleConditionCancel(){
+        this.conditionVisible = false
+      },
+      // 联锁条件弹窗-确认
+      handleConditionOk(){
+        this.$refs.conditionForm.submitForm();
+      },
+      // 联锁条件弹窗-确认回调
+      submitCallback(model){
+        if(this.tableClickRowIndex >= 0){
+          // 编辑回调
+          this.conditionDataSource[this.tableClickRowIndex] = model
+        } else {
+          // 新增回调
+          this.conditionDataSource.push(model)
+        }
+        this.conditionVisible = false
+      },
+      interLockSearch(searchText){
+        console.log(searchText)
+        // this.interLockData = !searchText ? [] : [searchText, searchText.repeat(2), searchText.repeat(3)]
+      },
+      // displayRender({ labels }) {
+      //   // 设置选择最后一位
+      //   return labels[labels.length - 1];
+      // },
+      // 位号选择改变
+      dianwerChange(e){
+        console.log(e)
+      },
+      // 新增联锁条件
+      handleAddCondition(){
+        this.tableClickRowIndex = -1
+        this.conditionVisible = true
+        this.$nextTick(()=>{
+          this.$refs.conditionForm.add();
+        })
+      },
+      // 编辑联锁条件
+      handleEditCondition(record, index){
+        console.log(index)
+        this.tableClickRowIndex = index
+        this.conditionVisible = true
+        this.$nextTick(()=>{
+          this.$refs.conditionForm.edit(record);
+        })
+      },
+      // 复制联锁条件
+      handleCopyCondition(record){
+        this.tableClickRowIndex = -1
+        this.conditionVisible = true
+        this.$nextTick(()=>{
+          this.$refs.conditionForm.edit(record);
+        })
+      },
+      // 删除联锁条件
+      handleDeleteCondition(record, index){
+        this.conditionDataSource.splice(index, 1)
+      },
+      // 新增联锁-弹窗
+      add () {
+        if(this.addInterlock && this.addInterlock.interlockType === '1'){
+          // 当前是新增-用树选择的装置系统进行赋值
+          this.model.interlockApparatusId = this.addInterlock.pid
+          this.model.interlockSystemId = this.addInterlock.id
+        }
+        this.getZzXtData()
+      },
+      // 编辑联锁-弹窗
+      loadData() {
+        var record = this.summaryEditInfo
+        console.log(record)
+        // this.model = Object.assign({}, record);
+        // 编辑时获取当前联锁所有详细信息
+        getAction(this.url.getLsAllData, {id: record.summaryid}).then(res => {
+          var resultArr = res.result
+          this.model = resultArr
+          this.conditionDataSource = resultArr.interlockDetailEditQueryVOList // 表格数据
+          this.model.interlockOutValueData = [resultArr.deviceId, resultArr.moduleName, resultArr.interlockOutValueTag+'&'+resultArr.interlockOutValue]
+          this.getZzXtData()
+        })
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            if(this.conditionDataSource.length===0){
+              this.$message.error('联锁条件未设置')
+              return false
+            }
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            // 转换数据
+            this.model.interlockDetailAddDTOList = this.conditionDataSource
+            // 联锁输出值位号
+            this.model.deviceId = this.model.interlockOutValueData[0]
+            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);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              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>
+<style lang="less">
+  .interlock-summary-item{
+    // box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
+    margin-bottom: 12px;
+    // border-radius: 4px;
+  }
+  .interlock-summary-item-title{
+    background-color: #F5F7FA;
+    line-height: 44px;
+    font-size: 16px;
+    padding: 0 10px 0 20px;
+    margin-bottom: 10px;
+    border-bottom: 1px solid #f3f3f3;
+    color: #323233;
+    font-weight: 600;
+  }
+  .u-flex-jab{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+  // .interlock-condition-form{
+  //   .ant-modal{
+  //     top: 4px;
+  //   }
+  // }
+</style>