<template>
  <!-- 时长分析详情 -->
  <el-drawer
    :title="`[` + form.lineName + `]时长分析`"
    :visible.sync="visible"
    :size="650"
    destroy-on-close
    @closed="visible = false"
  >
    <el-container v-loading="loading">
      <el-main>
        <el-form>
          <el-form-item label="事件序号" prop="stopNo"
            >{{ form.stopNo }}
          </el-form-item>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="线路名称" prop="lineName"
                >{{ form.lineName }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="主分支名称" prop="branchName"
                >{{ form.branchName }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="数据状态" prop="dataStatus"
                >{{ form.dataStatus }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="推送状态" prop="pushStatus"
                >{{ form.pushStatus }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="是否可维护" prop="repairFlag"
                >{{ form.repairFlag }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="是否纯专变" prop="isPureSpecia"
                >{{ form.isPureSpecia }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="事件类型" prop="eventType"
                >{{ form.eventType }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="研判停电性质" prop="stopType">
                <div v-for="(ite, i) in stopTypeList" :key="i">
                  <span v-if="ite.dictValue == form.stopType">
                    <el-tag type="danger" effect="dark">{{
                      ite.dictLabel
                    }}</el-tag></span
                  >
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="停电起始时间" prop="startDate"
                >{{ form.startDate }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="停电终止时间" prop="endDate"
                >{{ form.endDate }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="停电时户数" prop="stopNum"
                >{{ form.stopNum }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="所属市公司" prop="cityCompanyName"
                >{{ form.cityCompanyName }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="所属县公司" prop="countyCompanyName"
                >{{ form.countyCompanyName }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="所属供电所" prop="powerStationName"
                >{{ form.powerStationName }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="单位编码" prop="companyNo"
                >{{ form.companyNo }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="变电站名称" prop="siteName"
                >{{ form.siteName }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :lg="12">
              <el-form-item label="停电户次数" prop="powerOutageHouseholds"
                >{{ form.powerOutageHouseholds }}
              </el-form-item>
            </el-col>
            <el-col :lg="12">
              <el-form-item label="停电线次数" prop="powerOutageLine"
                >{{ form.powerOutageLine }}
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <el-footer style="text-align: center">
          <el-button @click="visible = false">关闭</el-button>
        </el-footer>
      </el-main>
    </el-container>
  </el-drawer>
</template>

<script>
export default {
  emits: ["success", "closed"],
  components: {},
  data() {
    return {
      loading: false,
      form: {},
      visible: false,
      isSaveing: false,
      stopTypeList: [],
    };
  },
  mounted() {},
  methods: {
    //显示
    async openModel(row) {
      this.visible = true;
      this.form = { ...row };
      // 风险类型
      const { data } = await this.getDicts("stop_type");
      this.stopTypeList = data;
    },
  },
};
</script>

<style></style>
