<template>
  <div class="edit-add-detail detail show-scrollbar">
    <div
      v-loading="detailLoading"
      class="form-content"
      element-loading-background="rgba(10 ,38 ,61, 0.9)"
      element-loading-text="详情加载中..."
    >
      <el-form
        ref="formInfo"
        :model="detailForm"
        class="detail-form"
        label-position="right"
        label-suffix="："
      >
        <div class="rows">
          <div class="rows-left">
            <div class="rows-hr"></div>
          </div>
          <div class="rows-title">
            <div class="text-overflow">基础数据</div>
          </div>
        </div>
        <el-row :gutter="24" style="flex-wrap: wrap" type="flex">
          <el-col :span="6">
            <el-form-item label="桥梁类型">
                <span :title="dictionaryEscape('qllx',detailForm.type)" class="text">
                  {{ dictionaryEscape('qllx', detailForm.type) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥梁方向">
                <span :title="dictionaryEscape('qlfx',detailForm.direction)" class="text">
                  {{ dictionaryEscape('qlfx', detailForm.direction) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="所在路段">
                <span :title="detailForm.roadSegmentName" class="text">
                  {{ detailForm.roadSegmentName || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥梁分类">
                <span :title="dictionaryEscape('qllb',detailForm.category)" class="text">
                  {{ dictionaryEscape('qllb', detailForm.category) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="建成日期">
                <span :title="detailForm.finishDay" class="text">
                  {{ detailForm.finishDay || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥梁桥形">
                <span :title="dictionaryEscape('qlqx',detailForm.briShape)" class="text">
                  {{ dictionaryEscape('qlqx', detailForm.briShape) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="养护等级">
                <span :title="dictionaryEscape('qldj',detailForm.grade)" class="text">
                  {{ dictionaryEscape('qldj', detailForm.grade) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="索数">
                <span :title="detailForm.cordCount" class="text">
                  {{ detailForm.cordCount || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="起点桩号">
                <span :title="detailForm.startPegK" class="text">
                  {{ detailForm.startPegK || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="止点桩号">
                <span :title="detailForm.endPegK" class="text">
                  {{ detailForm.endPegK || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="通航等级">
                <span :title="dictionaryEscape('qlthdj',detailForm.openTraffic)" class="text">
                  {{ dictionaryEscape('qlthdj', detailForm.openTraffic) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="评定等级">
                <span :title="dictionaryEscape('qlpddj',detailForm.evaluateGrade)" class="text">
                  {{ dictionaryEscape('qlpddj', detailForm.evaluateGrade) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="倾斜斜坡">
                <span :title="detailForm.inclinedslope" class="text">
                  {{ detailForm.inclinedslope || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥面铺装">
                <span :title="dictionaryEscape('qlbmaz',detailForm.surfaceinstall)" class="text">
                  {{ dictionaryEscape('qlbmaz', detailForm.surfaceinstall) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="垂直坡度">
                <span :title="detailForm.verticalSlope" class="text">
                  {{ detailForm.verticalSlope || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="地下通道">
                <span :title="detailForm.underchannelsName" class="text">
                  {{ detailForm.underchannelsName || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="通过荷载">
                <span :title="detailForm.passesload" class="text">
                  {{ detailForm.passesload || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="主桥孔数">
                <span :title="detailForm.holeCount" class="text">
                  {{ detailForm.holeCount || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="主桥主跨">
                <span :title="detailForm.mainSpan" class="text">
                  {{ detailForm.mainSpan || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="主桥边跨">
                <span :title="detailForm.sideSpan" class="text">
                  {{ detailForm.sideSpan || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="上部结构类型">
                <span :title="dictionaryEscape('qlsbjglx',detailForm.shapeType)" class="text">
                  {{ dictionaryEscape('qlsbjglx', detailForm.shapeType) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="跨越地物类别">
                <span :title="detailForm.spanObjectType" class="text">
                  {{ detailForm.spanObjectType || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="跨越地物名称">
                <span :title="detailForm.spanObjectName" class="text">
                  {{ detailForm.spanObjectName || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="监视单位">
                <span :title="detailForm.watchUnit" class="text">
                  {{ detailForm.watchUnit || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="单孔最大梁片数">
                <span :title="detailForm.spanCount" class="text">
                  {{ detailForm.spanCount || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="中心桩号">
                <span :title="detailForm.centPegK" class="text">
                  {{ detailForm.centPegK || '-' }}
                </span>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="前引桥长(m)">
                <span :title="detailForm.frontLeadLength" class="text">
                  {{ detailForm.frontLeadLength || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="后引桥长(m)">
                <span :title="detailForm.afterLeadLength" class="text">
                  {{ detailForm.afterLeadLength || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="经度">
                <span :title="detailForm.lng" class="text">
                  {{ detailForm.lng || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="纬度">
                <span :title="detailForm.lat" class="text">
                  {{ detailForm.lat || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="地下通道号">
                <span :title="detailForm.underchannelsPeg" class="text">
                  {{ detailForm.underchannelsPeg || '-' }}
                </span>
            </el-form-item>
          </el-col>
        </el-row>

        <div class="rows">
          <div class="rows-left">
            <div class="rows-hr"></div>
          </div>
          <div class="rows-title">
            <div class="text-overflow">行政识别数据</div>
          </div>
        </div>
        <el-row :gutter="24" style="flex-wrap: wrap" type="flex">
          <el-col :span="6">
            <el-form-item label="桥梁编号">
                <span :title="detailForm.number" class="text">
                  {{ detailForm.number || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥梁名称">
                <span :title="detailForm.name" class="text">
                  {{ detailForm.name || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="中心桩号">
                <span :title="detailForm.centPeg" class="text">
                  {{ detailForm.centPeg || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="功能类型">
                <span :title="dictionaryEscape('qlgnlx',detailForm.functionType)" class="text">
                  {{ dictionaryEscape('qlgnlx', detailForm.functionType) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="被跨越道路（通道）名">
                <span :title="detailForm.acrossRoadName" class="text">
                  {{ detailForm.acrossRoadName || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="被跨越道路（通道）桩号">
                <span :title="detailForm.acrossRoadPegk" class="text">
                  {{ detailForm.acrossRoadPegk || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="设计荷载">
                <span :title="detailForm.designload" class="text">
                  {{ detailForm.designload || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥梁平曲线半径">
                <span :title="detailForm.curveRadius" class="text">
                  {{ detailForm.curveRadius || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="设计单位">
                <span :title="detailForm.designUnit" class="text">
                  {{ detailForm.designUnit || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="施工单位">
                <span :title="detailForm.constructUnit" class="text">
                  {{ detailForm.constructUnit || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="业主单位">
                <span :title="detailForm.ownerUnit" class="text">
                  {{ detailForm.ownerUnit || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="管养单位">
                <span :title="detailForm.officeName" class="text">
                  {{ detailForm.officeName || '-' }}
                </span>
            </el-form-item>
          </el-col>
        </el-row>

        <div class="rows">
          <div class="rows-left">
            <div class="rows-hr"></div>
          </div>
          <div class="rows-title">
            <div class="text-overflow">桥梁技术指标</div>
          </div>
        </div>
        <el-row :gutter="24" style="flex-wrap: wrap" type="flex">
          <el-col :span="6">
            <el-form-item label="桥梁全长(m)">
                <span :title="detailForm.length" class="text">
                  {{ detailForm.length || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥面总宽(m)">
                <span :title="detailForm.deckWidth" class="text">
                  {{ detailForm.deckWidth || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="车道宽度(m)">
                <span :title="detailForm.laneWidth" class="text">
                  {{ detailForm.laneWidth || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="人行道宽度(m)">
                <span :title="detailForm.sidewalkWidth" class="text">
                  {{ detailForm.sidewalkWidth || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="护栏或防撞墙高度(m)">
                <span :title="detailForm.guardrailHight" class="text">
                  {{ detailForm.guardrailHight || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="中央分隔带宽度(m)">
                <span :title="detailForm.medianWidth" class="text">
                  {{ detailForm.medianWidth || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥面标准净空(m)">
                <span :title="detailForm.standardClearance" class="text">
                  {{ detailForm.standardClearance || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥面实际净空(m)">
                <span :title="detailForm.realClearance" class="text">
                  {{ detailForm.realClearance || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="引道总宽(m)">
                <span :title="detailForm.leadWidth" class="text">
                  {{ detailForm.leadWidth || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="引道线形或曲线半径(m)">
                <span :title="detailForm.leadRadius" class="text">
                  {{ detailForm.leadRadius || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="设计洪水频率及其水位">
                <span :title="detailForm.designWaterLevel" class="text">
                  {{ detailForm.designWaterLevel || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="历史洪水位">
                <span :title="detailForm.historyWaterLevel" class="text">
                  {{ detailForm.historyWaterLevel || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥面高程(m)">
                <span :title="detailForm.deckElevation" class="text">
                  {{ detailForm.deckElevation || '-' }}
                </span>
            </el-form-item>
          </el-col>
        </el-row>

        <div class="rows">
          <div class="rows-left">
            <div class="rows-hr"></div>
          </div>
          <div class="rows-title">
            <div class="text-overflow">桥梁结构信息</div>
          </div>
        </div>
        <el-row :gutter="24" style="flex-wrap: wrap" type="flex">
          <el-col :span="6">
            <el-form-item label="设计图纸">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.designDrawing)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.designDrawing) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="设计文件">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.designFile)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.designFile) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="施工文件">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.constructionFile)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.constructionFile) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="完成文件">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.completeFile)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.completeFile) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="检查文件">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.checkFile)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.checkFile) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="管理员文件">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.adminFile)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.adminFile) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="定期检查报告">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.regularCheckReport)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.regularCheckReport) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="专项检查报告">
                <span :title="dictionaryEscape('dazlsfqq',detailForm.specialCheckReport)" class="text">
                  {{ dictionaryEscape('dazlsfqq', detailForm.specialCheckReport) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="历史主文件">
                <span :title="detailForm.historyMainFile" class="text">
                  {{ detailForm.historyMainFile || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="文件编号">
                <span :title="detailForm.fileNumber" class="text">
                  {{ detailForm.fileNumber || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="文件地址">
                <span :title="detailForm.filePlace" class="text">
                  {{ detailForm.filePlace || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="建档时间">
                <span :title="detailForm.createDay" class="text">
                  {{ detailForm.createDay || '-' }}
                </span>
            </el-form-item>
          </el-col>
        </el-row>

        <div class="rows">
          <div class="rows-left">
            <div class="rows-hr"></div>
          </div>
          <div class="rows-title">
            <div class="text-overflow">结构技术信息</div>
          </div>
        </div>
        <el-row :gutter="24" style="flex-wrap: wrap" type="flex">
          <el-col :span="6">
            <el-form-item label="跨径组合">
                <span :title="detailForm.spanCombo" class="text">
                  {{ detailForm.spanCombo || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥面标高(m)">
                <span :title="detailForm.surfaceHight" class="text">
                  {{ detailForm.surfaceHight || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥下净高(m)">
                <span :title="detailForm.underHeight" class="text">
                  {{ detailForm.underHeight || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥上净高(m)">
                <span :title="detailForm.topHeight" class="text">
                  {{ detailForm.topHeight || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="引道类型">
                <span :title="detailForm.leadLine" class="text">
                  {{ detailForm.leadLine || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="引道路面宽(m)">
                <span :title="detailForm.leadRodaWidth" class="text">
                  {{ detailForm.leadRodaWidth || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="孔号">
                <span :title="detailForm.holeNo" class="text">
                  {{ detailForm.holeNo || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="孔号形式">
                <span :title="detailForm.holeNoShape" class="text">
                  {{ detailForm.holeNoShape || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="孔号跨径">
                <span :title="detailForm.holeNoSpan" class="text">
                  {{ detailForm.holeNoSpan || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="孔号材料">
                <span :title="detailForm.holeNoMaterial" class="text">
                  {{ detailForm.holeNoMaterial || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="墩台号">
                <span :title="detailForm.pierNo" class="text">
                  {{ detailForm.pierNo || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桥台护坡">
                <span :title="detailForm.protectSlope" class="text">
                  {{ detailForm.protectSlope || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="墩台号形式">
                <span :title="detailForm.pierNoShape" class="text">
                  {{ detailForm.pierNoShape || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="墩台号材料">
                <span :title="detailForm.pierNoMaterial" class="text">
                  {{ detailForm.pierNoMaterial || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="墩台号基础形式">
                <span :title="detailForm.pierNoBaseShape" class="text">
                  {{ detailForm.pierNoBaseShape || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="伸缩缝类型">
                <span :title="dictionaryEscape('qlsslx',detailForm.gapType)" class="text">
                  {{ dictionaryEscape('qlsslx', detailForm.gapType) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="支座类型">
                <span :title="dictionaryEscape('qlzzxs',detailForm.seatType)" class="text">
                  {{ dictionaryEscape('qlzzxs', detailForm.seatType) || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="抗震裂度">
                <span :title="detailForm.earthquakeDegree" class="text">
                  {{ detailForm.earthquakeDegree || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="保护体">
                <span :title="detailForm.protectBody" class="text">
                  {{ detailForm.protectBody || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="结构">
                <span :title="detailForm.structure" class="text">
                  {{ detailForm.structure || '-' }}
                </span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="自然水位">
                <span :title="detailForm.natureWaterLevel" class="text">
                  {{ detailForm.natureWaterLevel || '-' }}
                </span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>

    <el-backtop :visibility-height="20" target=".detail-form">
      <div class="top-box">UP</div>
    </el-backtop>
  </div>
</template>

<script>
import {tableDetail} from '@/api/patrolAndRescue/infoMgmtPatrolsRescues/bridgeInfo'
import PubSub from 'pubsub-js'
import {dictionaryEscape} from '@/utils/dictionary'

export default {
  name: 'DetailPage',
  props: {
    componentName: {
      default: 'TablePage',
      type: String
    }
  },
  components: {},
  data() {
    return {
      detailForm: {},
      detailLoading: true,
      pubSub: null
    }
  },
  watch: {
    componentName: {
      handler(newVal) {
        if (newVal === this.$options.name) {
          this.openPage()
        } else {
          this.closePage()
        }
      }
    }
  },
  mounted() {
    this.pubSub = PubSub.subscribe('DetailPage', (_, data) => {
      if (data.id) {
        this.getDetail(data.id)
      }
    })
  },
  methods: {
    dictionaryEscape,

    // 打开页面执行
    openPage() {
    },

    // 关闭页面执行
    closePage() {
      // 重置组件数据
      Object.assign(this.$data, this.$options.data.call(this), {pubSub: this.pubSub})
      this.$nextTick(_ => {
        this.$refs.formInfo.$el.scrollTop = 0
      })
    },

    // 获取详情
    async getDetail(id) {
      try {
        const {...detailForm} = await tableDetail(id)
        this.detailForm = detailForm
      } finally {
        this.detailLoading = false
      }
    }
  },
  beforeDestroy() {
    // 在组件销毁之前 清除订阅消息
    PubSub.unsubscribe(this.pubSub)
  }
}
</script>

<style lang="scss" scoped>
</style>
