<template>
  <el-form :model="formData" label-width="auto" label-position="left">
    <!-- 处置接收单位 -->
    <el-form-item label="处置接收单位">
      <div class="unit-selection">
        <el-select v-model="formData.receivingUnit" placeholder="请选择单位" style="width: 200px">
          <el-option label="巴宜区公安局" value="巴宜区公安局" />
        </el-select>
        <el-checkbox-group v-model="formData.unitTypes">
          <el-checkbox label="责任单位">责任单位</el-checkbox>
          <el-checkbox label="活动发生地">活动发生地</el-checkbox>
          <el-checkbox label="指定单位">指定单位</el-checkbox>
        </el-checkbox-group>
      </div>
    </el-form-item>
    <el-row :gutter="20">
      <el-col :span="5">
        <el-form-item label="提交方式">
          <el-checkbox-group v-model="formData.submitMethods">
            <el-checkbox label="网络推送">网络推送</el-checkbox>
            <el-checkbox label="短信发送">短信发送</el-checkbox>
          </el-checkbox-group>
        </el-form-item></el-col
      >
      <el-col :span="6"
        ><el-form-item label="签收时间">
          <el-date-picker
            v-model="formData.receiveTime"
            type="datetime"
            placeholder="签收时间"
            format="YYYY-MM-DD HH:mm"
            value-format="YYYY-MM-DD HH:mm"
          /> </el-form-item
      ></el-col>
    </el-row>

    <!-- 审批流程 -->
    <div class="approval-flow">
      <div style="height: 300px; max-width: 600px">
        <el-steps direction="vertical" :active="1">
          <el-step title="发起申请">
            <template #description>
              <div class="description flexcc">
                <div class="description-item">布控发起人</div>
                <div class="description-item">发起部门</div>
              </div>
            </template>
          </el-step>
          <el-step title="审核确认">
            <template #description>
              <div class="description flexcc">
                <div class="description-item">布控发起人</div>
                <div class="description-item">发起部门</div>
              </div>
            </template>
          </el-step>
          <el-step title="审批确认">
            <template #description>
              <div class="description flexcc">
                <div class="description-item">布控发起人</div>
                <div class="description-item">发起部门</div>
              </div>
            </template>
          </el-step>
        </el-steps>
      </div>
    </div>
  </el-form>
</template>

<script setup>
  import { ref } from "vue";

  const formData = ref({
    receivingUnit: "",
    unitTypes: [],
    submitMethods: [],
    receiveTime: "",
    initiator: "",
    initiatingDepartment: "",
    reviewer: "",
    reviewDepartment: "",
    approver: "",
    approveDepartment: ""
  });
</script>

<style scoped>
  .unit-selection {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .description {
    gap: 10px;
  }
  .description-item {
    width: 300px;
    height: 30px;
    padding: 0 20px;
    line-height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: rgb(131, 132, 135);
    box-sizing: border-box;
  }
</style>
