<template>
  <el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" top="10vh" width="60%" :before-close="handleClose" center :close-on-click-modal="false">
    <data-form ref="dataTop" :form="formTop" :inline="inline" :form-model="formModel" :rules="topRules" />
    <div style="height: 485px; overflow-y: auto;">
      <el-collapse v-model="activeNames">
        <el-collapse-item title="IBP盘AFC闸机配置对象" name="1">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataAfcLeft" :form="formAfc.left" :form-model="formModel.afczjConfig" :rules="rulesAfc" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataAfcRight" :form="formAfc.right" :form-model="formModel.afczjConfig" :rules="rulesAfc" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘电梯和扶梯配置对象" name="2">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataElevatorLeft" :form="formElevator.left" :form-model="formModel.dftConfig" :rules="rulesElevator" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataElevatorRight" :form="formElevator.right" :form-model="formModel.dftConfig" :rules="rulesElevator" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘环境与设备监控配置对象" name="3">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataMonitorLeft" :form="formMonitor.left" :form-model="formModel.hjsbjkConfig" :rules="rulesMonitor" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataMonitorRight" :form="formMonitor.right" :form-model="formModel.hjsbjkConfig" :rules="rulesMonitor" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘门禁配置对象" name="4">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataEgLeft" :form="formEg.left" :form-model="formModel.mjConfig" :rules="rulesEg" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataEgRight" :form="formEg.right" :form-model="formModel.mjConfig" :rules="rulesEg" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘屏蔽门配置对象" name="5">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataPsdLeft" :form="formPsd.left" :form-model="formModel.pbmConfig" :rules="rulesPsd" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataPsdRight" :form="formPsd.right" :form-model="formModel.pbmConfig" :rules="rulesPsd" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘隧道通风配置对象" name="6">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataTunnelLeft" :form="formTunnel.left" :form-model="formModel.sdtfConfig" :rules="rulesTunnel" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataTunnelRight" :form="formTunnel.right" :form-model="formModel.sdtfConfig" :rules="rulesTunnel" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘信号配置对象" name="7">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataTunnelLeft" :form="formSign.left" :form-model="formModel.xhConfig" :rules="rulesSign" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataTunnelRight" :form="formSign.right" :form-model="formModel.xhConfig" :rules="rulesSign" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘消火栓泵配置对象" name="8">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataFhLeft" :form="formFh.left" :form-model="formModel.xhsbConfig" :rules="rulesFh" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataFhRight" :form="formFh.right" :form-model="formModel.xhsbConfig" :rules="rulesFh" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘环境与设备监控——站台层配置对象" name="9">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataEemPlatformLeft" :form="formEemPlatform.left" :form-model="formModel.hjsbjkConfig.pfConfig" :rules="rulesEemPlatform" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataEemPlatformRight" :form="formEemPlatform.right" :form-model="formModel.hjsbjkConfig.pfConfig" :rules="rulesEemPlatform" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
        <el-collapse-item title="IBP盘环境与设备监控——站厅层配置对象" name="10">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输入配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataEemHallLeft" :form="formEemHall.left" :form-model="formModel.hjsbjkConfig.shfConfig" :rules="rulesEemHall" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card class="box-card">
                <div slot="header" class="clearfix">
                  <span>输出配置:</span>
                </div>
                <div style="margin-top: 20px">
                  <data-form ref="dataEemHallRight" :form="formEemHall.right" :form-model="formModel.hjsbjkConfig.shfConfig" :rules="rulesEemHall" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-collapse-item>
      </el-collapse>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
      <el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { getDeviceDetail, setIbpConfig} from '@/api/project';
import { deepAssign } from '@/utils/index';
const propMap = {
    afczjConfig: {
        rjjsf: '紧急释放按钮[AFC配置]',
        ryskg: '钥匙开关[AFC配置]',
        wjjsfand: '紧急释放按钮灯[AFC配置]',
        wjjsfztzsd: '紧急释放状态指示灯[AFC配置]',
        wxfldzsd: '消防联动指示灯[AFC配置]',
        wyxwzsd: '有效位指示灯[AFC配置]'
    },
    dftConfig: {
        rdt01tt: '电梯01停梯按钮[电扶梯配置]',
        rft01tt: '扶梯01停梯按钮[电扶梯配置]',
        rft02tt: '扶梯02停梯按钮[电扶梯配置]',
        rft03tt: '扶梯03停梯按钮[电扶梯配置]',
        rft04tt: '扶梯04停梯按钮[电扶梯配置]',
        ryskg: '钥匙开关[电扶梯配置]',
        wdt01sxzsd: '电梯01上行指示灯[电扶梯配置]',
        wdt01ttand: '电梯01停梯按钮灯[电扶梯配置]',
        wdt01xxzsd: '电梯01下行指示灯[电扶梯配置]',
        wdt01zsd: '电梯01指示灯[电扶梯配置]',
        wft01sxzsd: '扶梯01上行指示灯[电扶梯配置]',
        wft01ttand: '扶梯01停梯按钮灯[电扶梯配置]',
        wft01xxzsd: '扶梯01下行指示灯[电扶梯配置]',
        wft01zsd: '扶梯01指示灯[电扶梯配置]',
        wft02sxzsd: '扶梯02上行指示灯[电扶梯配置]',
        wft02ttand: '扶梯02停梯按钮灯[电扶梯配置]',
        wft02xxzsd: '扶梯02下行指示灯[电扶梯配置]',
        wft02zsd: '扶梯02指示灯[电扶梯配置]',
        wft03sxzsd: '扶梯03上行指示灯[电扶梯配置]',
        wft03ttand: '扶梯03停梯按钮灯[电扶梯配置]',
        wft03xxzsd: '扶梯03下行指示灯[电扶梯配置]',
        wft03zsd: '扶梯03指示灯[电扶梯配置]',
        wft04sxzsd: '扶梯04上行指示灯[电扶梯配置]',
        wft04ttand: '扶梯04停梯按钮灯[电扶梯配置]',
        wft04xxzsd: '扶梯04下行指示灯[电扶梯配置]',
        wft04zsd: '扶梯04指示灯[电扶梯配置]',
        wyskgzsd: '开关指示灯[电扶梯配置]'
    },
    hjsbjkConfig: {
        rfw: '复位按钮[环境设备监控配置]',
        rzhkg: '自动/手动钥匙转换开关[环境设备监控配置]',
        wfwand: '复位按钮灯[环境设备监控配置]',
        wsdztzsd: '手动状态指示灯[环境设备监控配置]',
        wzdztzsd: '自动状态指示灯[环境设备监控配置]',
        wzhkgzsd: '自动/手动钥匙转换开关手动位指示灯[环境设备监控配置]',
        pfConfig: {
            r04kvdykggs: '0.4KV低压开关柜室按钮[站台监控配置]',
            r35kvkggs: '35KV开关柜室按钮[站台监控配置]',
            rggqhz: '公共区火灾按钮[站台监控配置]',
            rkzs: '控制室按钮[站台监控配置]',
            rsytxsbshz: '商用通信设备室火灾按钮[站台监控配置]',
            rzlbyqs1: '整流变压器室一按钮[站台监控配置]',
            rzlbyqs2: '整流变压器室二按钮[站台监控配置]',
            rzlkggshz: '直流开关柜室火灾按钮[站台监控配置]',
            rzszddzshz: '再生制动电阻室火灾按钮[站台监控配置]',
            rzszdkzshz: '再生制动控制室火灾按钮[站台监控配置]',
            w35kvkggsand: '35KV开关柜室按钮灯[站台监控配置]',
            wggqhzand: '公共区火灾按钮灯[站台监控配置]',
            wkzsand: '控制室按钮灯[站台监控配置]',
            wr04kvdykggsand: '0.4KV低压开关柜室按钮灯[站台监控配置]',
            wsytxsbshzand: '商用通信设备室火灾按钮灯[站台监控配置]',
            wzlbyqs1and: '整流变压器室一按钮灯[站台监控配置]',
            wzlbyqs2and: '整流变压器室二按钮灯[站台监控配置]',
            wzlkggshzand: '直流开关柜室火灾按钮灯[站台监控配置]',
            wzszddzshzand: '再生制动电阻室火灾按钮灯[站台监控配置]',
            wzszdkzshzand: '再生制动控制室火灾按钮灯[站台监控配置]'
        },
        shfConfig: {
            rczkzshz: '车站控制室火灾按钮[站厅监控配置]',
            rggqhz: '公共区火灾按钮[站厅监控配置]',
            rydhkdkshz: '右端环控电控室火灾按钮[站厅监控配置]',
            rydjfkthz: '右端机房空调火灾按钮[站厅监控配置]',
            rydlsjfhz: '右端冷水机房火灾按钮[站厅监控配置]',
            rydqyfjhz: '右端其余房间火灾按钮[站厅监控配置]',
            rydzlhz: '右端走廊火灾按钮[站厅监控配置]',
            rzdhkdkshz: '左端环控电控室火灾按钮[站厅监控配置]',
            rzdktjfhz: '左端空调机房火灾按钮[站厅监控配置]',
            rzdqyfjhz: '左端其余房间火灾按钮[站厅监控配置]',
            wczkzshzand: '车站控制室火灾按钮灯[站厅监控配置]',
            wggqhzand: '公共区火灾按钮灯[站厅监控配置]',
            wydhkdkshzand: '右端环控电控室火灾按钮灯[站厅监控配置]',
            wydjfkthzand: '右端机房空调火灾按钮灯[站厅监控配置]',
            wydlsjfhzand: '右端冷水机房火灾按钮灯[站厅监控配置]',
            wydqyfjhzand: '右端其余房间火灾按钮灯[站厅监控配置]',
            wydzlhzand: '右端走廊火灾按钮灯[站厅监控配置]',
            wzdhkdkshzand: '左端环控电控室火灾按钮灯[站厅监控配置]',
            wzdktjfhzand: '左端空调机房火灾按钮灯[站厅监控配置]',
            wzdqyfjhzand: '左端其余房间火灾按钮灯[站厅监控配置]'
        }
    },
    mjConfig: {
        radjjsf: 'A端紧急释放按钮[门禁配置]',
        rbdjjsf: 'B端紧急释放按钮[门禁配置]',
        wadjjsfand: 'A端紧急释放按钮灯[门禁配置]',
        wadjjsfzsdg: 'A端紧急释放绿色指示灯[门禁配置]',
        wadjjsfzsdr: 'A端紧急释放红色指示灯[门禁配置]',
        wadjjsfzsdy: 'A端紧急释放黄色指示灯[门禁配置]',
        wbdjjsfand: 'B端紧急释放按钮灯[门禁配置]',
        wbdjjsfzsdg: 'B端紧急释放绿色指示灯[门禁配置]',
        wbdjjsfzsdr: 'B端紧急释放红色指示灯[门禁配置]',
        wbdjjsfzsdy: 'B端紧急释放黄色指示灯[门禁配置]'
    },
    pbmConfig: {
        rsxczyx: '上行操作允许钥匙开关[屏蔽门配置]',
        rsxgm: '上行关门按钮[屏蔽门配置]',
        rsxkm: '上行开门按钮[屏蔽门配置]',
        rxxczyx: '下行操作允许钥匙开关[屏蔽门配置]',
        rxxgm: '下行关门按钮[屏蔽门配置]',
        rxxkm: '下行开门按钮[屏蔽门配置]',
        wsxczyxzsd: '上行操作允许指示灯[屏蔽门配置]',
        wsxgmand: '上行关门按钮灯[屏蔽门配置]',
        wsxgmsbzsd: '上行关门锁闭指示灯[屏蔽门配置]',
        wsxkmand: '上行开门按钮灯[屏蔽门配置]',
        wsxkmdwzsd: '上行开门到位指示灯[屏蔽门配置]',
        wxxczyxzsd: '下行操作允许指示灯[屏蔽门配置]',
        wxxgmand: '下行关门按钮灯[屏蔽门配置]',
        wxxgmsbzsd: '下行关门锁闭指示灯[屏蔽门配置]',
        wxxkmand: '下行开门按钮灯[屏蔽门配置]',
        wxxkmdwzsd: '下行开门到位指示灯[屏蔽门配置]'
    },
    sdtfConfig: {
        rsxcrdx: '上行出入段线按钮p[隧道通风配置]',
        rsxczsdhz: '上行车站隧道火灾按钮[隧道通风配置]',
        rsxhz1y: '上行火灾1右按钮[隧道通风配置]',
        rsxhz2y: '上行火灾2右按钮[隧道通风配置]',
        rsxzc1y: '上行阻塞1右按钮[隧道通风配置]',
        rsxzc2y: '上行阻塞2右按钮[隧道通风配置]',
        rsxzthz: '上行站台火灾按钮[隧道通风配置]',
        rxxcrdx: '下行出入段线按钮[隧道通风配置]',
        rxxczsdhz: '下行车站隧道火灾按钮[隧道通风配置]',
        rxxhz1y: '下行火灾1右按钮[隧道通风配置]',
        rxxhz2y: '下行火灾2右按钮[隧道通风配置]',
        rxxzc1y: '下行阻塞1右按钮[隧道通风配置]',
        rxxzc2y: '下行阻塞2右按钮[隧道通风配置]',
        rxxzthz: '下行站台火灾按钮[隧道通风配置]',
        wsxcrdxand: '上行出入段线按钮灯[隧道通风配置]',
        wsxczsdhzand: '上行车站隧道火灾按钮灯[隧道通风配置]',
        wsxhz1yand: '上行火灾1右按钮灯[隧道通风配置]',
        wsxhz2yand:'上行火灾2右按钮灯[隧道通风配置]',
        wsxzc1yand: '上行阻塞1右按钮灯[隧道通风配置]',
        wsxzc2yand: '上行阻塞2右按钮灯[隧道通风配置]',
        wsxzthzand: '上行站台火灾按钮灯[隧道通风配置]',
        wxxcrdxand: '下行出入段线按钮灯[隧道通风配置]',
        wxxczsdhzand: '下行车站隧道火灾按钮灯[隧道通风配置]',
        wxxhz1yand: '下行火灾1右按钮灯[隧道通风配置]',
        wxxhz2yand: '下行火灾2右按钮灯[隧道通风配置]',
        wxxzc1yand: '下行阻塞1右按钮灯[隧道通风配置]',
        wxxzc2yand: '下行阻塞2右按钮灯[隧道通风配置]',
        wxxzthzand: '下行站台火灾按钮灯[隧道通风配置]'
    },
    xhConfig: {
        rsxjjtc: '上行紧急停车按钮[信号配置]',
        rsxjljc: '上行警铃解除按钮[信号配置]',
        rsxkc: '上行扣车按钮[信号配置]',
        rsxqxjjtc: '上行取消紧急停车按钮[信号配置]',
        rsxqxkc: '上行取消扣车按钮[信号配置]',
        rsxsd: '上行试灯按钮[信号配置]',
        rxxjjtc: '下行紧急停车按钮[信号配置]',
        rxxjljc: '下行警铃解除按钮[信号配置]',
        rxxkc: '下行扣车按钮[信号配置]',
        rxxqxjjtc: '下行取消紧急停车按钮[信号配置]',
        rxxqxkc: '下行取消扣车按钮[信号配置]',
        rxxsd: '下行试灯按钮[信号配置]',
        wfmq: '蜂鸣器[信号配置]',
        wsxjjtccand: '上行紧急停车按钮灯[信号配置]',
        wsxjjtczsd: '上行取消紧急停车按钮灯[信号配置]',
        wsxjljcand: '上行警铃解除按钮灯[信号配置]',
        wsxkcand: '上行扣车按钮灯[信号配置]',
        wsxkczsd: '上行扣车指示灯[信号配置]',
        wsxqxjjtcand: '上行取消紧急停车按钮灯[信号配置]',
        wsxqxkcand: '上行取消扣车按钮灯[信号配置]',
        wsxqxkczsd: '上行取消扣车指示灯[信号配置]',
        wsxsdand: '上行试灯按钮灯[信号配置]',
        wxxjjtccand: '下行紧急停车按钮灯[信号配置]',
        wxxjjtczsd: '下行取消紧急停车按钮灯[信号配置]',
        wxxjljcand: '下行警铃解除按钮灯[信号配置]',
        wxxkcand: '下行扣车按钮灯[信号配置]',
        wxxkczsd: '下行扣车指示灯[信号配置]',
        wxxqxjjtcand: '下行取消紧急停车按钮灯[信号配置]',
        wxxqxkcand: '下行取消扣车按钮灯[信号配置]',
        wxxqxkczsd: '下行取消扣车指示灯[信号配置]',
        wxxsdand: '下行试灯按钮灯[信号配置]'
    },
    xhsbConfig: {
        rqb: '启泵按钮[消火栓泵配置]',
        rtb: '停泵按钮[消火栓泵配置]',
        rxy: '消音按钮[消火栓泵配置]',
        ryskg: '钥匙开关[消火栓泵配置]',
        wgzbjzsd: '故障报警指示灯[消火栓泵配置]',
        wqband: '启泵按钮灯[消火栓泵配置]',
        wqbjl: '启泵警铃蜂鸣器[消火栓泵配置]',
        wtband: '停泵按钮灯[消火栓泵配置]',
        wxyand: '消音按钮灯[消火栓泵配置]',
        wyxwzsd: '有效位指示灯[消火栓泵配置]',
        wzdztzsd: '自动状态指示灯[消火栓泵配置]'
    }
};
export default {
    name: 'EditConfigIbp',
    data() {
        return {
            title: '编辑IBP盘配置',
            activeNames: '',
            checkCount: 0,
            data: null,
            formModel: {
                afczjConfig: {},
                dftConfig: {},
                hjsbjkConfig: {
                    pfConfig: {},
                    shfConfig: {}
                },
                mjConfig: {},
                pbmConfig: {},
                sdtfConfig: {},
                xhConfig: {},
                xhsbConfig: {}
            },
            topRules: {
                addr: [
                    { required: true, message: '请填写网关位地址', trigger: 'blur' }
                ],
                quantity: [
                    { required: true, message: '请填写位数量', trigger: 'blur'}
                ],
                ribpsd: [
                    { required: true, message: '请填写IBP盘试灯按钮位', trigger: 'blur'}
                ],
                wibpsdand: [
                    { required: true, message: '请填写IBP盘试灯指示灯位', trigger: 'blur'}
                ]
            },
            dialogVisible: false,
            inline: true,
            formAfc:{
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'rjjsf', label: '紧急释放按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'ryskg', label: '钥匙开关:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'wjjsfand', label: '紧急释放按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wjjsfztzsd', label: '紧急释放状态指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxfldzsd', label: '消防联动指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wyxwzsd', label: '有效位指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formElevator: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'rdt01tt', label: '电梯01停梯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rft01tt', label: '扶梯01停梯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rft02tt', label: '扶梯02停梯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rft03tt', label: '扶梯03停梯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rft04tt', label: '扶梯04停梯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'ryskg', label: '钥匙开关:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'wdt01sxzsd', label: '电梯01上行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wdt01ttand', label: '电梯01停梯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wdt01xxzsd', label: '电梯01下行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wdt01zsd', label: '电梯01指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft01sxzsd', label: '扶梯01上行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft01ttand', label: '扶梯01停梯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft01xxzsd', label: '扶梯01下行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft01zsd', label: '扶梯01指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft02sxzsd', label: '扶梯02上行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft02ttand', label: '扶梯02停梯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft02xxzsd', label: '扶梯02下行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft02zsd', label: '扶梯02指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft03sxzsd', label: '扶梯03上行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft03ttand', label: '扶梯03停梯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft03xxzsd', label: '扶梯03下行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft03zsd', label: '扶梯03指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft04sxzsd', label: '扶梯04上行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft04ttand', label: '扶梯04停梯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft04xxzsd', label: '扶梯04下行指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wft04zsd', label: '扶梯04指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wyskgzsd', label: '开关指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formMonitor: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'rfw', label: '复位按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzhkg', label: '自动/手动钥匙转换开关:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '250px',
                    items: [
                        { prop:'wfwand', label: '复位按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsdztzsd', label: '手动状态指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzdztzsd', label: '自动状态指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzhkgzsd', label: '自动/手动钥匙转换开关手动位指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formEg: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'radjjsf', label: 'A端紧急释放按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rbdjjsf', label: 'B端紧急释放按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'wadjjsfand', label: 'A端紧急释放按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wadjjsfzsdg', label: 'A端紧急释放绿色指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wadjjsfzsdr', label: 'A端紧急释放红色指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wadjjsfzsdy', label: 'A端紧急释放黄色指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wbdjjsfand', label: 'B端紧急释放按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wbdjjsfzsdg', label: 'B端紧急释放绿色指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wbdjjsfzsdr', label: 'B端紧急释放红色指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wbdjjsfzsdy', label: 'B端紧急释放黄色指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }

            },
            formPsd: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'rsxczyx', label: '上行操作允许钥匙开关:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxgm', label: '上行关门按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxkm', label: '上行开门按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxczyx', label: '下行操作允许钥匙开关:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxgm', label: '下行关门按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxkm', label: '下行开门按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'wsxczyxzsd', label: '上行操作允许指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxgmand', label: '上行关门按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxgmsbzsd', label: '上行关门锁闭指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxkmand', label: '上行开门按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxkmdwzsd', label: '上行开门到位指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxczyxzsd', label: '下行操作允许指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxgmand', label: '下行关门按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxgmsbzsd', label: '下行关门锁闭指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxkmand', label: '下行开门按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxkmdwzsd', label: '下行开门到位指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formTunnel: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'rsxcrdx', label: '上行出入段线按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxczsdhz', label: '上行车站隧道火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxhz1y', label: '上行火灾1右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxhz2y', label: '上行火灾2右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxzc1y', label: '上行阻塞1右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxzc2y', label: '上行阻塞2右按钮 :', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxzthz', label: '上行站台火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxcrdx', label: '下行出入段线按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxczsdhz', label: '下行车站隧道火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxhz1y', label: '下行火灾1右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxhz2y', label: '下行火灾2右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxzc1y', label: '下行阻塞1右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxzc2y', label: '下行阻塞2右按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxzthz', label: '下行站台火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'wsxcrdxand', label: '上行出入段线按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxczsdhzand', label: '上行车站隧道火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxhz1yand', label: '上行火灾1右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxhz2yand', label: '上行火灾2右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxzc1yand', label: '上行阻塞1右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxzc2yand', label: '上行阻塞2右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxzthzand', label: '上行站台火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxcrdxand', label: '下行出入段线按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxczsdhzand', label: '下行车站隧道火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxhz1yand', label: '下行火灾1右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxhz2yand', label: '下行火灾2右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxzc1yand', label: '下行阻塞1右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxzc2yand', label: '下行阻塞2右按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxzthzand', label: '下行站台火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formSign: {
                left: {
                    labelWidth: '220px',
                    items:[
                        { prop:'rsxjjtc', label: '上行紧急停车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxjljc', label: '上行警铃解除按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxkc', label: '上行扣车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxqxjjtc', label: '上行取消紧急停车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxqxkc', label: '上行取消扣车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsxsd', label: '上行试灯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxjjtc', label: '下行紧急停车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxjljc', label: '下行警铃解除按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxkc', label: '下行扣车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxqxjjtc', label: '下行取消紧急停车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxqxkc', label: '下行取消扣车按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxxsd', label: '下行试灯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items:[
                        { prop:'wfmq', label: '蜂鸣器:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxjjtccand', label: '上行紧急停车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxjjtczsd', label: '上行取消紧急停车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxjljcand', label: '上行警铃解除按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxkcand', label: '上行扣车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxkczsd', label: '上行扣车指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxqxjjtcand', label: '上行取消紧急停车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxqxkcand', label: '上行取消扣车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxqxkczsd', label: '上行取消扣车指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsxsdand', label: '上行试灯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxjjtccand', label: '下行紧急停车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxjjtczsd', label: '下行取消紧急停车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxjljcand', label: '下行警铃解除按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxkcand', label: '下行扣车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxkczsd', label: '下行扣车指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxqxjjtcand', label: '下行取消紧急停车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxqxkcand', label: '下行取消扣车按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxqxkczsd', label: '下行取消扣车指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxxsdand', label: '下行试灯按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formFh: {
                left: {
                    labelWidth: '220px',
                    items:[
                        { prop:'rqb', label: '启泵按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rtb', label: '停泵按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rxy', label: '消音按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'ryskg', label: '钥匙开关:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items:[
                        { prop:'wgzbjzsd', label: '故障报警指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wqband', label: '启泵按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wqbjl', label: '启泵警铃蜂鸣器:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wtband', label: '停泵按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wxyand', label: '消音按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wyxwzsd', label: '有效位指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzdztzsd', label: '自动状态指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            formEemPlatform: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'r04kvdykggs', label: '0.4KV低压开关柜室按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'r35kvkggs', label: '35KV开关柜室按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rggqhz', label: '公共区火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rkzs', label: '控制室按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rsytxsbshz', label: '商用通信设备室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzlbyqs1', label: '整流变压器室一按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzlbyqs2', label: '整流变压器室二按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzlkggshz', label: '直流开关柜室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzszddzshz', label: '再生制动电阻室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzszdkzshz', label: '再生制动控制室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'w35kvkggsand', label: '35KV开关柜室按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wggqhzand', label: '公共区火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wkzsand', label: '控制室按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wr04kvdykggsand', label: '0.4KV低压开关柜室按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wsytxsbshzand', label: '商用通信设备室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzlbyqs1and', label: '整流变压器室一按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzlbyqs2and', label: '整流变压器室二按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzlkggshzand', label: '直流开关柜室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzszddzshzand', label: '再生制动电阻室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzszdkzshzand', label: '再生制动控制室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }

            },
            formEemHall: {
                left: {
                    labelWidth: '220px',
                    items: [
                        { prop:'rczkzshz', label: '车站控制室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rggqhz', label: '公共区火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rydhkdkshz', label: '右端环控电控室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rydjfkthz', label: '右端机房空调火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rydlsjfhz', label: '右端冷水机房火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rydqyfjhz', label: '右端其余房间火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rydzlhz', label: '右端走廊火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzdhkdkshz', label: '左端环控电控室火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzdktjfhz', label: '左端空调机房火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'rzdqyfjhz', label: '左端其余房间火灾按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                },
                right: {
                    labelWidth: '220px',
                    items: [
                        { prop:'wczkzshzand', label: '车站控制室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wggqhzand', label: '公共区火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wydhkdkshzand', label: '右端环控电控室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wydjfkthzand', label: '右端机房空调火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wydlsjfhzand', label: '右端冷水机房火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wydqyfjhzand', label: '右端其余房间火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wydzlhzand', label: '右端走廊火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzdhkdkshzand', label: '左端环控电控室火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzdktjfhzand', label: '左端空调机房火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'},
                        { prop:'wzdqyfjhzand', label: '左端其余房间火灾按钮灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, size: 'small'}
                    ]
                }
            },
            rulesAfc: {},
            rulesElevator: {},
            rulesMonitor: {},
            rulesEg: {},
            rulesPsd: {},
            rulesTunnel: {},
            rulesSign: {},
            rulesFh: {},
            rulesEemPlatform:{},
            rulesEemHall: {}
        };
    },
    computed: {
        formTop() {
            return {
                labelWidth: '220px',
                items: [
                    { prop:'addr', label: '网关位地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
                    { prop:'quantity', label: '位数量:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
                    { prop: 'ribpsd', label: 'IBP盘试灯按钮:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0 },
                    { prop: 'wibpsdand', label: 'IBP盘试灯指示灯:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0 }
                ]
            };
        }
    },
    watch: {
        'checkCount'() {
            if (this.checkCount === 19) {
                const model = deepAssign({}, this.formModel);
                if (JSON.stringify(model.afczjConfig) === '{}') {
                    model.afczjConfig = null;
                }
                if (JSON.stringify(model.dftConfig) === '{}') {
                    model.dftConfig = null;
                }
                if (JSON.stringify(model.hjsbjkConfig.pfConfig) === '{}' && JSON.stringify(model.hjsbjkConfig.shfConfig) === '{}') {
                    model.hjsbjkConfig = null;
                } else if (JSON.stringify(model.hjsbjkConfig.pfConfig) === '{}') {
                    model.hjsbjkConfig.pfConfig = null;
                } else if (JSON.stringify(model.hjsbjkConfig.shfConfig) === '{}') {
                    model.hjsbjkConfig.shfConfig = null;
                }
                if (JSON.stringify(model.mjConfig) === '{}') {
                    model.mjConfig = null;
                }
                if (JSON.stringify(model.pbmConfig) === '{}') {
                    model.pbmConfig = null;
                }
                if (JSON.stringify(model.sdtfConfig) === '{}') {
                    model.sdtfConfig = null;
                }
                if (JSON.stringify(model.xhConfig) === '{}') {
                    model.xhConfig = null;
                }
                if (JSON.stringify(model.xhsbConfig) === '{}') {
                    model.xhsbConfig = null;
                }
                setIbpConfig(this.data.id, model).then(resp => {
                    this.$message.success('设置IBP网关映射配置成功');
                    this.handleClose();
                    this.$emit('reloadTable');
                }).catch(error => {
                    this.$message.error(this.$t('tip.modifyTheFailure') + error.message);
                });
            }
        }
    },
    mounted() {
        for (const prop in propMap.afczjConfig) {
            this.rulesAfc[prop] = [{ validator: this.validateDevice, trigger: ['blur', 'change'] }];
        }
        for (const prop in propMap.dftConfig) {
            this.rulesElevator[prop] = [{ validator: this.validateDevice, trigger: ['blur', 'change'] }];
        }
        for (const prop in propMap.hjsbjkConfig) {
            if (typeof propMap.hjsbjkConfig[prop] == 'string') {
                this.rulesMonitor[prop] = [{ validator: this.validateDevice, trigger: ['blur', 'change'] }];
            }
        }
        for (const prop in propMap.mjConfig) {
            this.rulesEg[prop] = [{ validator: this.validateDevice, trigger: ['blur', 'change'] }];
        }
        for (const prop in propMap.pbmConfig) {
            this.rulesPsd[prop] = [{ validator: this.validateDevice, trigger: ['blur', 'change'] }];
        }
        for (const prop in propMap.sdtfConfig) {
            this.rulesTunnel[prop] = [{validator: this.validateDevice, trigger: ['blur', 'change']}];
        }
        for (const prop in propMap.xhConfig) {
            this.rulesSign[prop] = [{validator: this.validateDevice, trigger: ['blur', 'change']}];
        }
        for (const prop in propMap.xhsbConfig) {
            this.rulesFh[prop] = [{validator: this.validateDevice, trigger: ['blur', 'change']}];
        }
        for (const prop in propMap.hjsbjkConfig.pfConfig) {
            this.rulesEemPlatform[prop] = [{validator: this.validateDevice, trigger: ['blur', 'change']}];
        }
        for (const prop in propMap.hjsbjkConfig.shfConfig) {
            this.rulesEemHall[prop] = [{validator: this.validateDevice, trigger: ['blur', 'change']}];
        }
    },
    methods: {
        doShow(row) {
            this.initData(row);
            this.data = row;
            this.dialogVisible = true;
        },
        validateDevice(rule, value, callback) {
            const list = [];
            for (const config in propMap) {
                for (const prop in propMap[config]) {
                    if (typeof propMap[config][prop] == 'string') {
                        if (this.formModel[config][prop] && this.formModel[config][prop] === value) {
                            list.push(propMap[config][prop]);
                        }
                    } else {
                        for (const childProp in propMap[config][prop]) {
                            if (typeof propMap[config][prop][childProp] == 'string') {
                                if (this.formModel[config][prop][childProp] && this.formModel[config][prop][childProp] === value) {
                                    list.push(propMap[config][prop][childProp]);
                                }
                            }
                        }
                    }
                }
            }
            if (!this.formModel.quantity) {
                this.$refs.dataTop.validateField('quantity');
            }
            if (list.length > 1) {
                let repeatedValue = '';
                list.forEach((item, index) => {
                    repeatedValue += item;
                    if (index !== list.length - 1) {
                        repeatedValue += '与';
                    }
                });
                callback(new Error(repeatedValue + '位置重复，请调整！'));
            } else if (this.formModel.quantity && value >= this.formModel.quantity) {
                callback(new Error('网关位应小于位数量！'));
            } else {
                callback();
            }
        },
        initData(row) {
            getDeviceDetail(row.id).then(resp => {
                if (resp.data.config) {
                    const model = JSON.parse(resp.data.config) || {};
                    if (!model.afczjConfig) {
                        model.afczjConfig = {};
                    }
                    if (!model.dftConfig) {
                        model.dftConfig = {};
                    }
                    if (!model.hjsbjkConfig) {
                        model.hjsbjkConfig = {
                            pfConfig: {},
                            shfConfig: {}
                        };
                        if (!model.hjsbjkConfig.pfConfig) {
                            model.hjsbjkConfig.pfConfig = {};
                        }
                        if (!model.hjsbjkConfig.shfConfig) {
                            model.hjsbjkConfig.shfConfig = {};
                        }
                    }
                    if (!model.mjConfig) {
                        model.mjConfig = {};
                    }
                    if (!model.pbmConfig) {
                        model.pbmConfig = {};
                    }
                    if (!model.sdtfConfig) {
                        model.sdtfConfig = {};
                    }
                    if (!model.xhConfig) {
                        model.xhConfig = {};
                    }
                    if (!model.xhsbConfig) {
                        model.xhsbConfig = {};
                    }
                    this.formModel = model;
                }
            }).catch(()=> {
                this.$message.error('获取项目设备详情失败！');
            });
        },
        doSave() {
            this.checkCount = 0;
            const that = this;
            this.$refs.dataTop.validateForm(() => { that.checkCount++; });
            this.$refs.dataAfcLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataAfcRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataElevatorLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataElevatorRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataMonitorLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataMonitorRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataEgLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataEgRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataPsdLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataPsdRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataTunnelLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataTunnelRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataFhLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataFhRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataEemPlatformLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataEemPlatformRight.validateForm(() => { that.checkCount++; });
            this.$refs.dataEemHallLeft.validateForm(() => { that.checkCount++; });
            this.$refs.dataEemHallRight.validateForm(() => { that.checkCount++; });
        },
        handleClose() {
            this.formModel = {
                afczjConfig: {},
                dftConfig: {},
                hjsbjkConfig: {
                    pfConfig: {},
                    shfConfig: {}
                },
                mjConfig: {},
                pbmConfig: {},
                sdtfConfig: {},
                xhConfig: {},
                xhsbConfig: {}
            };
            this.data = null;
            this.dialogVisible = false;
        }
    }
};
</script>

<style scoped>
	/deep/
	.el-dialog--center .el-dialog__body {
		padding: 25px 25px 10px;
	}
</style>
