<template>
  <el-form>
    <el-row :gutter="5">
      <el-col :span="5">
        <el-card>
          <el-form-item required prop="c" style="display: flex;flex-direction: column">
            <div>工业增加值（万元）<span style="color: red">*</span></div>
            <el-input v-model="form.a"></el-input>
          </el-form-item>
        </el-card>
      </el-col>
      <el-col :span="5">
        <el-card>
          <el-form-item required prop="c" style="display: flex;flex-direction: column">
            <div>产值（万元）<span style="color: red">*</span></div>
            <el-input v-model="form.b"></el-input>
          </el-form-item>
        </el-card>
      </el-col>
      <el-col :span="5">
        <el-card>
          <el-form-item required prop="c" style="display: flex;flex-direction: column">
            <div>能源总费用（吨标煤）</div>
            <el-input v-model="form.c"></el-input>
          </el-form-item>
        </el-card>
      </el-col>
      <el-col :span="5">
        <el-card>
          <el-form-item required prop="c" style="display: flex;flex-direction: column">
            <div>生产总成本（万元）<span style="color: red">*</span></div>
            <el-input v-model="form.d"></el-input>
          </el-form-item>
        </el-card>
      </el-col>
      <el-col :span="4" offset="1">
        <!--        <el-card>-->
        <div style="display: flex;align-items: center;height: 100%;">
          <el-button type="primary" @click="calc">计算</el-button>
          <el-button @click="report">生成报告</el-button>
        </div>
        <!--        </el-card>-->
      </el-col>

    </el-row>
  </el-form>
  <el-row :gutter="5" style="margin-top: 20px;">
    <el-col :span="24" style="display: flex;gap: 10px;height: 60vh;">
      <el-card style="flex: 1;">
        <template #header>
          <div>
            <span>煤</span>
            <img src="/src/assets/svg/u540.svg"/>
          </div>
        </template>
        <template #default>
          <el-form>
            <el-form-item label="厡煤">
              <el-input v-model="form2.a"/>
            </el-form-item>
            <el-form-item label="洗精煤">
              <el-input v-model="form2.b"/>
            </el-form-item>
            <el-form-item label="洗中煤，煤泥">
              <el-input v-model="form2.c"/>
            </el-form-item>
            <el-form-item label="焦炭">
              <el-input v-model="form2.dd"/>
            </el-form-item>
          </el-form>
        </template>
      </el-card>
      <el-card style="flex: 1;">
        <template #header>
          <div>
            <span>油</span>
            <img src="/src/assets/svg/u561.svg"/>
          </div>
        </template>
        <template #default>
          <el-form>
            <el-form-item label="厡油">
              <el-input v-model="form2.sda"/>
            </el-form-item>
            <el-form-item label="重油">
              <el-input v-model="form2.zxc"/>
            </el-form-item>
            <el-form-item label="煤油">
              <el-input v-model="form2.asdf"/>
            </el-form-item>
            <el-form-item label="汽油">
              <el-input v-model="form2.fg"/>
            </el-form-item>
            <el-form-item label="柴油">
              <el-input v-model="form2.fg"/>
            </el-form-item>
          </el-form>
        </template>
      </el-card>
      <el-card style="flex: 1;">
        <template #header>
          <div>
            <span>气</span>
            <img src="/src/assets/svg/u598.svg"/>
          </div>
        </template>
        <template #default>
          <el-form>
            <el-form-item label="油田天然气">
              <el-input v-model="form2.jh"/>
            </el-form-item>
            <el-form-item label="气田天然气">
              <el-input v-model="form2.we"/>
            </el-form-item>
          </el-form>
        </template>
      </el-card>
      <el-card style="flex: 1;">
        <template #header>
          <div>
            <span>电</span>
            <img src="/src/assets/svg/u540.svg"/>
          </div>
        </template>
        <template #default>
          <el-form>
            <el-form-item label="无烟煤(吨)">
              <el-input v-model="form3.a"/>
            </el-form-item>
            <el-form-item label="烟煤(吨)">
              <el-input v-model="form3.b"/>
            </el-form-item>
            <el-form-item label="原煤(吨)">
              <el-input v-model="form3.c"/>
            </el-form-item>
            <div class="custom-hr">
              <span>清洁能源</span>
            </div>
            <el-form-item label="光伏">
              <el-input v-model="form3.d"/>
            </el-form-item>
            <el-form-item label="风电">
              <el-input v-model="form3.e"/>
            </el-form-item>
          </el-form>
        </template>
      </el-card>
      <el-card style="flex: 1;">
        <template #header>
          <div>
            <span>热</span>
            <img src="/src/assets/svg/u540.svg"/>
          </div>
        </template>
        <template #default>
          <el-empty></el-empty>
        </template>
      </el-card>
    </el-col>
  </el-row>
</template>

<script setup>
import {ElMessage} from "element-plus";

const form = reactive({
  a: ''
})
const form2 = reactive({
  a: ''
})
const form3 = reactive({
  a: ''
})
const calc = () => {
  ElMessage.success("已提交计算")
}
const report = () => {
  ElMessage.info("正在提交生成报告")
}
</script>

<style scoped>
.custom-hr {
  display: flex;
  align-items: center;
  position: relative;
  margin: 20px 0;
}

.custom-hr::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #ccc;
  z-index: 1;
}

.custom-hr span {
  position: relative;
  background-color: white;
  padding: 0 10px;
  z-index: 2;
  font-size: 14px;
}
</style>