<template>
  <div>
    <layout-card>
      <el-row :gutter="20">
        <el-col :span="24">
          <el-descriptions :column="2" border>
            <el-descriptions-item label="会议标题">
              {{ detailItems.WAYBILLNUMBER }}
            </el-descriptions-item>
            <el-descriptions-item label="运输企业">
              {{ detailItems.TRANSPORTATIONCOMPANY }}
            </el-descriptions-item>
            <el-descriptions-item label="运输任务">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="运输车辆">
                      {{ detailItems.TRANSPORTVEHICLE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="运输性能">
                      {{ detailItems.TRANSPORTNATURE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="发车时间">
                      {{ detailItems.DEPARTURETIME }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="发车地点">
                      {{ detailItems.DEPARTUREPLACE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="车架号">
                      {{ detailItems.FRAMENUMBER }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="从业人员">
                      {{ detailItems.EMPLOYEES }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="收车时间">
                      {{ detailItems.ARRIVALTIME }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="收车地点">
                      {{ detailItems.ARRIVALPLACE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="天气情况">
                      {{ detailItems.WEATHERCONDITION }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="联系电话">
                      {{ detailItems.CONTACTPHONE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="额定载荷">
                      {{ detailItems.RATEDLOAD }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="实际载荷">
                      {{ detailItems.ACTUALLOAD }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
              </el-row>
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions :column="1" border>
            <el-descriptions-item label="行车安全问询">
              {{ detailItems.DRIVINGSAFETYINQUIRY }}
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions :column="1" border>
            <el-descriptions-item label="出车前检查">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="检查人">
                      {{ detailItems.PREDEPARTUREINSPECTOR }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="检查时间">
                      {{ detailItems.PREDEPARTUREINSPECTIONTIME }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="故障处理">
                      {{ detailItems.PREDEPARTUREFAULTTREATMENT }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="出车结论">
                      {{ detailItems.DEPARTURECONCLUSION }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="出车前照片">
                      {{ detailItems.PREDEPARTUREPHOTO }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="出车前签字">
                      {{ detailItems.PREDEPARTURESIGNATURE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
              </el-row>
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions :column="1" border>
            <el-descriptions-item label="行车中检查">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="检查人">
                      {{ detailItems.INDRIVINGINSPECTOR }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="检查时间">
                      {{ detailItems.INSPECTIONTIMEWHILEDRIVING }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="故障处理">
                      {{ detailItems.INDRIVINGFAULTTREATMENT }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="行车中照片">
                      {{ detailItems.PHOTOSWHILEDRIVING }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="行车中签字">
                      {{ detailItems.SIGNINGWHILEDRIVING }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
              </el-row>
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions :column="1" border>
            <el-descriptions-item label="收车后检查">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="检查人">
                      {{ detailItems.POSTARRIVALINSPECTOR }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="检查时间">
                      {{ detailItems.POSTARRIVALINSPECTIONTIME }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="故障处理">
                      {{ detailItems.POSTARRIVALFAULTTREATMENT }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="收车后照片">
                      {{ detailItems.CHECKPHOTOS }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="收车后签字">
                      {{ detailItems.CHECKSIGNATURE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
              </el-row>
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions :column="1" border>
            <el-descriptions-item label="交接班记录">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="驾驶时长">
                      {{ detailItems.DRIVINGDURATION }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="时间区间">
                      {{ detailItems.TIMEINTERVAL }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="交接地点">
                      {{ detailItems.HANDOVERPLACE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="交接班人">
                      {{ detailItems.HANDOVERPERSON }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
                <el-col :span="6">
                  <el-descriptions :column="1" border>
                    <el-descriptions-item label="接班图片">
                      {{ detailItems.RELIEFPICTURE }}
                    </el-descriptions-item>
                  </el-descriptions>
                </el-col>
              </el-row>
            </el-descriptions-item>
          </el-descriptions>
          <el-descriptions :column="1" border>
            <el-descriptions-item label="安全负责人">
              {{ detailItems.SAFETYOFFICER }}
            </el-descriptions-item>
          </el-descriptions>
        </el-col>
      </el-row>
    </layout-card>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { getSafetyDrivingLogView } from "@/request/traffic_driving_log.js";
import { useRoute } from "vue-router";
const route = useRoute();
const { DRIVING_LOG_ID } = route.query;
const detailItems = ref({
  WAYBILLNUMBER: "",
  TRANSPORTATIONCOMPANY: "",
  TRANSPORTVEHICLE: "",
  TRANSPORTNATURE: "",
  DEPARTURETIME: "",
  DEPARTUREPLACE: "",
  FRAMENUMBER: "",
  EMPLOYEES: "",
  ARRIVALTIME: "",
  ARRIVALPLACE: "",
  WEATHERCONDITION: "",
  CONTACTPHONE: "",
  ACTUALLOAD: "",
  DRIVINGSAFETYINQUIRY: "",
  DEPARTURECONCLUSION: "",
  PREDEPARTUREINSPECTOR: "",
  PREDEPARTUREINSPECTIONTIME: "",
  PREDEPARTUREFAULTTREATMENT: "",
  INDRIVINGINSPECTOR: "",
  INSPECTIONTIMEWHILEDRIVING: "",
  INDRIVINGFAULTTREATMENT: "",
  POSTARRIVALINSPECTOR: "",
  POSTARRIVALINSPECTIONTIME: "",
  POSTARRIVALFAULTTREATMENT: "",
  DRIVINGDURATION: "",
  TIMEINTERVAL: "",
  HANDOVERPLACE: "",
  HANDOVERPERSON: "",
  RELIEFPICTURE: "",
  SAFETYOFFICER: "",
  PREDEPARTUREPHOTO: "",
  PREDEPARTURESIGNATURE: "",
  PHOTOSWHILEDRIVING: "",
  SIGNINGWHILEDRIVING: "",
  CHECKPHOTOS: "",
  CHECKSIGNATURE: "",
});

const fnGetData = async () => {
  const response = await getSafetyDrivingLogView({ DRIVING_LOG_ID });
  detailItems.value = response.pd;
};
fnGetData();
</script>

<style scoped></style>
