<template>
  <div class="main">
    <MOSTY.FromPage :title="data.config.title" @closeDialog="black">
      <template #content>
        <div class="xsl">
          <div class="Box">
            <div class="title">驾驶员基本情况登记表</div>
            <div class="desc">
              <div style="width: calc(100% / 3)">
                记录编号：{{ data.fromObj.driverfileno }}
              </div>
              <div style="width: calc(100% / 3)">{{ data.fromObj.xtCjsj }}</div>
              <div style="width: calc(100% / 3)">NO：</div>
            </div>
            <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
              <tr class="ontds">
                <td>姓名 </td>
                <td>{{ data.fromObj.drivername }}</td>
                <td>性别</td>
                <td> <dict-tag v-if="data.fromObj.sex" :options="D_BZ_XB" :value="data.fromObj.sex" color="black"
                    :tag="false" />
                  <span v-else>无</span>
                </td>
                <td>党团员</td>
                <td> <dict-tag v-if="data.fromObj.politicalstatus" :options="D_BZ_AQRYZZMM"
                    :value="data.fromObj.politicalstatus" color="black" :tag="false" />
                  <span v-else>无</span>
                </td>
                <td rowspan="3">
                  <div style="
                      width: 64%;
                      margin: auto;
                      overflow: hidden;
                      height: 155px;
                    ">
                    <MOSTY.Upload width="150px" v-if='data.fromObj.picture' :limit="1" :nopicer="false" :isImg="true"
                      :ShowfileList="false" v-model="data.fromObj.picture" @filehandleChange="changeFiles"
                      :disabled="true">
                    </MOSTY.Upload>
                    <img v-else :src="getImgUrl('img/emptyImg.jpg')" alt="" style="height:180px;width:237px;">
                  </div>
                </td>
              </tr>
              <tr>
                <td>出生年月</td>
                <td> {{ data.fromObj.birth }}</td>
                <td>民族</td>
                <td> <dict-tag v-if="data.fromObj.nation" :options="D_BZ_MZ" :value="data.fromObj.nation" color="black"
                    :tag="false" />
                  <span v-else>无</span>
                </td>
                <td>技术职称</td>
                <td> {{ data.fromObj.technicaltitle }}</td>

              </tr>
              <tr>
                <td>籍贯</td>
                <td colspan="2"> {{ data.fromObj.nativeplace }}</td>
                <td>文化程度</td>
                <td colspan="2">
                  <dict-tag v-if="data.fromObj.educationlevel" :options="D_BZ_AQRYWHCD"
                    :value="data.fromObj.educationlevel" color="black" :tag="false" />
                  <span v-else>无</span>
                </td>
              </tr>
              <tr>
                <td>参加工作时间</td>
                <td> {{ data.fromObj.joinworkdate }}</td>
                <td>驾驶级别</td>
                <td><dict-tag v-if="data.fromObj.drivelevel" :options="D_TB_DRIVELEVEL" :value="data.fromObj.drivelevel"
                    color="black" :tag="false" />
                  <span v-else>无</span>
                </td>
                <td>驾驶工龄</td>
                <td colspan="2"> {{ data.fromObj.driveage }}</td>
              </tr>
              <tr>
                <td>工作单位</td>
                <td colspan="2"> {{ data.fromObj.nameaffiliation }}</td>
                <td>职工类型</td>
                <td colspan="3"> <dict-tag v-if="data.fromObj.empnature" :options="D_TB_EMPNATURE"
                    :value="data.fromObj.empnature" color="black" :tag="false" />
                  <span v-else>无</span>
                </td>
              </tr>
              <tr>
                <td>家庭住址</td>
                <td colspan="2"> {{ data.fromObj.homeaddr }}</td>
                <td>身体健康状况</td>
                <td colspan="3"> <dict-tag v-if="data.fromObj.healthstatus" :options="D_TB_HEALTH"
                    :value="data.fromObj.healthstatus" color="black" :tag="false" />
                  <span v-else>无</span>
                </td>
              </tr>
              <tr>
                <td>初次领证时间</td>
                <td colspan="2"> {{ data.fromObj.initgetlicensedate }}</td>
                <td>驾驶证号</td>
                <td colspan="3"> {{ data.fromObj.drivenumber }}</td>
              </tr>
              <tr>
                <td>准驾车类</td>
                <td colspan="2">
                  <dict-tag v-if="data.fromObj.drivelevel" :options="D_TB_DRIVELEVEL" :value="data.fromObj.drivelevel"
                    color="black" :tag="false" />
                </td>
                <td>安全行车公里</td>
                <td colspan="3"> {{ data.fromObj.safedistance }}（万）公里 </td>
              </tr>
              <!-- <tr>
                <td>违法违规历史</td>
                <td colspan="6"> {{ data.fromObj.regulationfile }}</td>
              </tr> -->
              <tr>
                <td colspan="7">
                  <el-table :data="data.tbDriverWadcList" style="width: 100%;">
                    <el-table-column label="参加工作简历情况" width="150">
                      <el-table-column prop="time" label="何年至何年">
                      </el-table-column>
                      <el-table-column prop="location" label="在何单位">
                      </el-table-column>
                      <el-table-column prop="work" label="干何工作"> </el-table-column>
                      <el-table-column prop="certifier" label="证明人">
                      </el-table-column>
                    </el-table-column>
                  </el-table>
                </td>

              </tr>
              <tr>
                <td colspan="7"> <el-table :data="data.tbDriverSituatiList" style="width: 100%">
                    <el-table-column label="主要驾驶情况" width="150">
                      <el-table-column prop="time" label="何年至何年">
                      </el-table-column>
                      <el-table-column prop="location" label="所在单位">
                      </el-table-column>
                      <el-table-column prop="cartype" label="驾驶车种">
                      </el-table-column>
                    </el-table-column>
                  </el-table></td>

              </tr>
            </table>
            <div style="margin-top: 20px;color:red;">
              注:1、体健康状况要求提供医院体检证明，每年要求提供1次。
            </div>
            <div style="margin-left: 25px; margin-top: 20px;color:red;">
              2、违法违规历史要求提供当地派出所证明。
            </div>
          </div>
          <div class="Box">
            <div class="title">主要驾驶经历及证件登记</div>
            <div v-if="data.tbDriverMdeatlrfList && data.tbDriverMdeatlrfList.length > 0"
              v-for="(item, index) in data.tbDriverMdeatlrfList" :key="item">
              <div class="desc">
                <div style="width:calc(100% / 3)">记录编号：AB-036 </div>
                <div style="width:calc(100% / 3)">{{ item.xtCjsj }}</div>
                <div style="width: calc(100% / 3)">NO：{{ index + 1 }}</div>
              </div>
              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr class="ontds">
                  <td>学习驾驶 </td>
                  <td colspan="2">{{ item.startlearningtodrive }} 至{{ item.endlearningtodrive }} </td>
                  <td>学习驾驶学校 </td>
                  <td colspan="2">{{ item.drivingschool }} </td>
                </tr>
                <tr>
                  <td>实习驾驶 </td>
                  <td colspan="2">{{ item.drivingstarttime }} 至{{ item.pdot }} </td>
                  <td>所在单位 </td>
                  <td colspan="2">{{ item.drivingunit }} </td>
                </tr>
                <tr>
                  <td>正式驾驶 </td>
                  <td colspan="2">{{ item.fulldrivingstarttime }} 至{{ item.fdteot }} </td>
                  <td>所在单位 </td>
                  <td colspan="2">{{ item.fulldrivingunit }} </td>
                </tr>
                <tr>
                  <td>增驾时间 </td>
                  <td colspan="2">{{ item.sidt }} 至{{ item.idet }} </td>
                  <td>所在单位 </td>
                  <td colspan="2">{{ item.idu }} </td>
                </tr>
                <tr>
                  <td>是否干过汽车修理或其它 </td>
                  <td colspan="2">{{ item.wdoar }}</td>
                  <td>长期主要驾驶车型 </td>
                  <td colspan="2">{{ item.itmdr }} </td>
                </tr>
              </table>
            </div>
            <table v-else align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
              <tr class="ontds">
                <td>学习驾驶 </td>
                <td colspan="2"> 至 </td>
                <td>学习驾驶学校 </td>
                <td colspan="2"> </td>
              </tr>
              <tr>
                <td>实习驾驶 </td>
                <td colspan="2">至</td>
                <td>所在单位 </td>
                <td colspan="2"> </td>
              </tr>
              <tr>
                <td>正式驾驶 </td>
                <td colspan="2"> 至</td>
                <td>所在单位 </td>
                <td colspan="2"> </td>
              </tr>
              <tr>
                <td>增驾时间 </td>
                <td colspan="2">至 </td>
                <td>所在单位 </td>
                <td colspan="2"> </td>
              </tr>
              <tr>
                <td>是否干过汽车修理或其它 </td>
                <td colspan="2"></td>
                <td>长期主要驾驶车型 </td>
                <td colspan="2"></td>
              </tr>
            </table>
            <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
              <tr>
                <td colspan="1">机动车驾驶证正证复印件</td>
                <td colspan="3">
                  <div style="
                      width: 80%;
                      margin: auto;
                      overflow: hidden;
                      height: 100%;
                    ">
                    <MOSTY.Upload width="250px" v-if='data.fromObj.drivinglicencefile' :limit="1" :nopicer="false"
                      :isImg="true" :ShowfileList="false" v-model="data.fromObj.drivinglicencefile"
                      @filehandleChange="changeFiles" :disabled="true">
                    </MOSTY.Upload>
                    <img v-else :src="getImgUrl('img/emptyImg.jpg')" alt="" style="height:180px;width:237px;">
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="1">机动车驾驶证副证复印件</td>
                <td colspan="3">
                  <div style="
                      width: 80%;
                      margin: auto;
                      overflow: hidden;
                      height: 100%;
                    ">
                    <MOSTY.Upload width="250px" v-if='data.fromObj.drivinglicenceReverseflie' :limit="1"
                      :nopicer="false" :isImg="true" :ShowfileList="false"
                      v-model="data.fromObj.drivinglicenceReverseflie" @filehandleChange="changeFiles" :disabled="true">
                    </MOSTY.Upload>
                    <img v-else :src="getImgUrl('img/emptyImg.jpg')" alt="" style="height:180px;width:237px;">
                  </div>
                </td>
              </tr>
            </table>
          </div>
          <div class="Box">
            <div class="title">机动车驾驶员调入、借用、聘用考核登记表</div>
            <div v-if="data.tbDriverTeerfList && data.tbDriverTeerfList.length > 0"
              v-for="(item, index) in data.tbDriverTeerfList" :key="item">
              <div class="desc">
                <div style="width:calc(100% / 3)">记录编号：AB-036 </div>
                <div style="width:calc(100% / 3)">{{ item.xtCjsj }}</div>
                <div style="width: calc(100% / 3)">NO：{{ index + 1 }}</div>
              </div>
              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr>
                  <td>姓名 </td>
                  <td>{{ data.fromObj.drivername }} </td>
                  <td>性别 </td>
                  <td><dict-tag v-if="data.fromObj.sex" :options="D_BZ_XB" :value="data.fromObj.sex" color="black"
                      :tag="false" />
                    <span v-else>无</span>
                  </td>
                  <td>出生年月</td>
                  <td> {{ data.fromObj.birth }}</td>
                  <td>身体状况（附体检表）</td>
                  <td> <dict-tag v-if="data.fromObj.healthstatus" :options="D_TB_HEALTH"
                      :value="data.fromObj.healthstatus" color="black" :tag="false" />
                    <span v-else>无</span>
                  </td>
                </tr>
                <tr>
                  <td>原工作单位</td>
                  <td colspan="2">{{ item.company }}</td>
                  <td colspan="2">参加工作时间</td>
                  <td> {{ data.fromObj.joinworkdate }}</td>
                  <td>现准备调、借、聘用</td>
                  <td> {{ item.technicaltitle }}</td>
                </tr>
                <tr>
                  <td>驾驶证号</td>
                  <td>{{ data.fromObj.drivenumber }}</td>
                  <td>准驾车型</td>
                  <td> <dict-tag v-if="data.fromObj.drivelevel" :options="D_TB_DRIVELEVEL"
                      :value="data.fromObj.drivelevel" color="black" :tag="false" />
                    <span v-else>无</span>
                  </td>
                  <td>初次领证时间</td>
                  <td> {{ data.fromObj.initgetlicensedate }}</td>
                  <td>有效期</td>
                  <td> {{ item.lvp }}</td>
                </tr>
                <tr>
                  <td colspan="2">专职驾驶工作</td>
                  <td colspan="4"> {{ item.driveage }}</td>
                  <td>技术职称</td>
                  <td> {{ data.fromObj.technicaltitle }}</td>
                </tr>
                <tr>
                  <td colspan="3">考试科目</td>
                  <td colspan="2">考试时间</td>
                  <td>考试成绩</td>
                  <td>是否合格</td>
                  <td>考核人员</td>
                </tr>
                <tr>
                  <td colspan="3"> {{ item.aes }}</td>
                  <td colspan="2"> {{ item.testtime }}</td>
                  <td> {{ item.testscores }}</td>
                  <td> {{ item.pass }}</td>
                  <td> {{ item.api }}</td>
                </tr>
                <tr>
                  <td colspan="4">思想作风、生活作风、职业道德政审情况</td>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'>{{ item.sopeopc }}</div>
                    <div class='tr'>考核人员:{{ item.iawslsepcas }}</div>
                  </td>
                </tr>

                <tr>
                  <td colspan="8">是否符合行业驾驶员使用要求:{{ item.dcwir }}</td>
                </tr>
                <tr>
                  <td colspan="4">单位车管部门意见</td>
                  <td colspan="4">单位安全职能部门意见</td>
                </tr>
                <tr>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'>{{ item.uvmd }}</div>
                    <div class='tr'>{{ item.uvmdatt }}</div>
                  </td>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'>{{ item.ufotssv }}</div>
                    <div class='tr'>{{ item.usfatt }}</div>
                  </td>
                </tr>
                <tr>
                  <td colspan="4">单位领导意见</td>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'>{{ item.unitleadersviews }}</div>
                    <div class='tr'>考核人员:{{ item.unitleadersviewstime }}</div>
                  </td>
                </tr>
              </table>
            </div>
            <div v-else>
              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr>
                  <td>姓名 </td>
                  <td>{{ data.fromObj.drivername }} </td>
                  <td>性别 </td>
                  <td><dict-tag v-if="data.fromObj.sex" :options="D_BZ_XB" :value="data.fromObj.sex" color="black"
                      :tag="false" />
                    <span v-else>无</span>
                  </td>
                  <td>出生年月</td>
                  <td> </td>
                  <td>身体状况（附体检表）</td>
                  <td> <dict-tag v-if="data.fromObj.healthstatus" :options="D_TB_HEALTH"
                      :value="data.fromObj.healthstatus" color="black" :tag="false" />
                    <span v-else>无</span>
                  </td>
                </tr>
                <tr>
                  <td>原工作单位</td>
                  <td colspan="2"></td>
                  <td colspan="2">参加工作时间</td>
                  <td> </td>
                  <td>现准备调、借、聘用</td>
                  <td> </td>
                </tr>
                <tr>
                  <td>驾驶证号</td>
                  <td></td>
                  <td>准驾车型</td>
                  <td> <dict-tag v-if="data.fromObj.drivelevel" :options="D_TB_DRIVELEVEL"
                      :value="data.fromObj.drivelevel" color="black" :tag="false" />
                    <span v-else>无</span>
                  </td>
                  <td>初次领证时间</td>
                  <td> </td>
                  <td>有效期</td>
                  <td> </td>
                </tr>
                <tr>
                  <td colspan="2">专职驾驶工作</td>
                  <td colspan="4"> </td>
                  <td>技术职称</td>
                  <td> </td>
                </tr>
                <tr>
                  <td colspan="3">考试科目</td>
                  <td colspan="2">考试时间</td>
                  <td>考试成绩</td>
                  <td>是否合格</td>
                  <td>考核人员</td>
                </tr>
                <tr>
                  <td colspan="3"> </td>
                  <td colspan="2"> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr>
                  <td colspan="4">思想作风、生活作风、职业道德政审情况</td>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'></div>
                    <div class='tr'>考核人员:</div>
                  </td>
                </tr>

                <tr>
                  <td colspan="8">是否符合行业驾驶员使用要求:</td>
                </tr>
                <tr>
                  <td colspan="4">单位车管部门意见</td>
                  <td colspan="4">单位安全职能部门意见</td>
                </tr>
                <tr>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'></div>
                    <div class='tr'></div>
                  </td>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'></div>
                    <div class='tr'></div>
                  </td>
                </tr>
                <tr>
                  <td colspan="4">单位领导意见</td>
                  <td colspan="4">
                    <div class='tl' style='height:150px;'></div>
                    <div class='tr'>考核人员:</div>
                  </td>
                </tr>
              </table>
            </div>
          </div>
          <div class="Box">
            <div class="title">驾驶员受奖励登记表</div>
            <div v-if="data.tbDriverDwrrfList && data.tbDriverDwrrfList.length > 0"
              v-for="(item, index) in data.tbDriverDwrrfList" :key="item">
              <div class="desc">
                <div style="width:calc(100% / 3)">记录编号：AB-036 </div>
                <div style="width:calc(100% / 3)">{{ item.xtCjsj }}</div>
                <div style="width: calc(100% / 3)">NO：{{ index + 1 }}</div>
              </div>
              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr>
                  <td>授奖时间 </td>
                  <td colspan="2">{{ item.awardstime }} </td>
                  <td>授何奖励附奖励证书复印件 </td>
                  <td colspan="2">
                    <MOSTY.Upload width="250px" v-if='data.fromObj.rewardfile' :limit="1" :nopicer="true" :isImg="false"
                      :ShowfileList="true" v-model="data.fromObj.rewardfile" @filehandleChange="changeFiles"
                      :gsgfList="['pdf', 'ofd', 'doc', 'docx', 'xls', 'xlsx', 'wps']" :disabled="true" :showbut="false">
                    </MOSTY.Upload>
                  </td>
                </tr>
                <tr>
                  <td>经办单位 </td>
                  <td colspan="2">{{ item.dtp }} </td>
                  <td>批准机关 </td>
                  <td colspan="2">{{ item.approvalauthority }} </td>
                </tr>
                <tr>
                  <td>简要事迹 </td>
                  <td colspan="5" style='height:300px'>{{ item.abriefstory }} </td>
                </tr>
              </table>
            </div>
            <div v-else>

              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr class="ontds">
                  <td>授奖时间 </td>
                  <td colspan="2"> </td>
                  <td>授何奖励附奖励证书复印件 </td>
                  <td colspan="2">
                    <MOSTY.Upload width="250px" v-if='data.fromObj.rewardfile' :limit="1" :nopicer="true" :isImg="false"
                      :ShowfileList="true" v-model="data.fromObj.rewardfile" @filehandleChange="changeFiles"
                      :gsgfList="['pdf', 'ofd', 'doc', 'docx', 'xls', 'xlsx', 'wps']" :disabled="true" :showbut="false">
                    </MOSTY.Upload>
                  </td>
                </tr>
                <tr>
                  <td>经办单位 </td>
                  <td colspan="2"></td>
                  <td>批准机关 </td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td>简要事迹 </td>
                  <td colspan="5" style='height:300px'> </td>
                </tr>
              </table>
            </div>
          </div>
          <div class="Box">
            <div class="title">驾驶员肇事登记表</div>
            <div v-if="data.tbDriverRfohardList && data.tbDriverRfohardList.length > 0"
              v-for="(item, index) in data.tbDriverRfohardList" :key="item">
              <div class="desc">
                <div style="width:calc(100% / 3)">记录编号：AB-036 </div>
                <div style="width:calc(100% / 3)">{{ item.xtCjsj }}</div>
                <div style="width: calc(100% / 3)">NO：{{ index + 1 }}</div>
              </div>
              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr>
                  <td>事故时间 </td>
                  <td colspan="2">{{ item.accidenttime }} </td>
                  <td>肇事地点 </td>
                  <td colspan="2">{{ item.incidentsite }} </td>
                </tr>
                <tr>
                  <td>事故类别 </td>
                  <td colspan="2">{{ item.accidenttype }} </td>
                  <td>经济损失 </td>
                  <td colspan="2">{{ item.economiclosses }} </td>
                </tr>
                <tr>
                  <td>死、伤人数 </td>
                  <td colspan="2">{{ item.toll }} </td>
                  <td>事故责任 </td>
                  <td colspan="2">{{ item.atfault }} </td>
                </tr>
                <tr>
                  <td>事故简要经过 </td>
                  <td colspan="5" style='height:300px'>{{ item.taba }} </td>
                </tr>
                <tr>
                  <td>公安及单位处理意见经过 </td>
                  <td colspan="5" style='height:300px'>{{ item.psuatsfd }} </td>
                </tr>
              </table>
            </div>
            <div v-else>

              <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
                <tr class="ontds">
                  <td>事故时间 </td>
                  <td colspan="2"></td>
                  <td>肇事地点 </td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td>事故类别 </td>
                  <td colspan="2"> </td>
                  <td>经济损失 </td>
                  <td colspan="2"> </td>
                </tr>
                <tr>
                  <td>死、伤人数 </td>
                  <td colspan="2"></td>
                  <td>事故责任 </td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td>事故简要经过 </td>
                  <td colspan="5" style='height:300px'> </td>
                </tr>
                <tr>
                  <td>公安及单位处理意见经过 </td>
                  <td colspan="5" style='height:300px'></td>
                </tr>
              </table>
            </div>
          </div>
          <div class="Box">
            <div class="title">驾驶员家庭情况表</div>
            <div class="desc">
              <div style="width:calc(100% / 3)">记录编号：AB-036 </div>
              <div style="width:calc(100% / 3)">{{ data.love.xtCjsj }}</div>
              <div style="width: calc(100% / 3)">NO：1</div>
            </div>
            <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
              <tr class="ontds">
                <td>爱人姓名 </td>
                <td>{{ data.love.jname }} </td>
                <td>性别 </td>
                <td><dict-tag v-if="data.love.jsex" :options="D_BZ_XB" :value="data.love.jsex" color="black"
                    :tag="false" />
                  <span v-else>无</span>
                </td>
                <td>出生年月 </td>
                <td>{{ data.love.jbirth }} </td>
              </tr>
              <tr>
                <td>职业情况 </td>
                <td>{{ data.love.professionalsttus }} </td>
                <td>党、团员 </td>
                <td><dict-tag v-if="data.love.jzzmm" :options="D_BZ_AQRYZZMM" :value="data.love.jzzmm" color="black"
                    :tag="false" />
                  <span v-else>无</span>
                </td>
                <td>文化程度 </td>
                <td><dict-tag v-if="data.love.jleducation" :options="D_BZ_AQRYWHCD" :value="data.love.jleducation"
                    color="black" :tag="false" />
                  <span v-else>无</span>
                </td>
              </tr>
              <tr>
                <td>工作单位</td>
                <td colspan="2">{{ data.love.jworkunit }}</td>
                <td>籍贯</td>
                <td colspan="2">{{ data.love.jnativeplace }}</td>
              </tr>
              <tr>
                <td>爱人身体状况</td>
                <td colspan="3">{{ data.love.jbody }}</td>
                <td>工资收入</td>
                <td>{{ data.love.wageincome }}</td>
              </tr>
              <tr>
                <td colspan="7">
                  <el-table :data="data.famaly" style="width: 100%">
                    <el-table-column label="家庭主要成员" width="150">
                      <el-table-column prop="jname" label="姓名"> </el-table-column>
                      <el-table-column prop="jsex" label="性别">
                        <template #default="{ row }">
                          <dict-tag v-if="row.jsex" :options="D_BZ_XB" :value="row.jsex" color="black" :tag="false" />
                          <span v-else>无</span>
                        </template>
                      </el-table-column>
                      <el-table-column prop="jage" label="年龄"> </el-table-column>
                      <el-table-column prop="jworkunit" label="工作单位">
                      </el-table-column>
                    </el-table-column>

                  </el-table>
                </td>
              </tr>
              <tr>
                <td>备注</td>
                <td colspan="6" style='height:300px;'>{{ data.love.jremark }}</td>
              </tr>
            </table>
          </div>
          <div class="Box">
            <div class="title">驾驶员培训记录表</div>
            <table align="center" cellspacing="0" cellpadding="0" border="1" style="width:1274px">
              <tr>
                <td colspan="7">
                  <el-table :data="data.tbDriverPxjlList" style="width: 100%">
                    <el-table-column label="驾驶员培训记录" width="150">
                      <el-table-column prop="theme" label="安全主题"> </el-table-column>
                      <el-table-column prop="content" label="学习内容"></el-table-column>
                      <el-table-column prop="period" label="学时"> </el-table-column>
                      <el-table-column prop="studyTime" label="学习日期"></el-table-column>
                    </el-table-column>
                  </el-table>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </template>
      <template #footer>
        <el-button @click="black"> <el-icon>
            <DocumentDelete />
          </el-icon>
          <span>关闭</span></el-button>
      </template>
    </MOSTY.FromPage>


  </div>
</template>

<script setup>
import { getImgUrl } from "@/utils/tools.js"
import {
  reactive,
  ref,
  watchEffect,
  getCurrentInstance,
  onMounted,
  watch,
  nextTick
} from "vue";
import * as MOSTY from "@/components/MyComponents/index";
import { getApi, deleteApi, putApi, postApi } from "@/api/tobAcco_api.js";
const { proxy } = getCurrentInstance();
const { D_BZ_AQRYZZMM } = proxy.$dict("D_BZ_AQRYZZMM");
const { D_TB_DRIVELEVEL } = proxy.$dict("D_TB_DRIVELEVEL");
const { D_BZ_XB } = proxy.$dict("D_BZ_XB");
const { D_BZ_MZ } = proxy.$dict("D_BZ_MZ");
const { D_TB_EMPNATURE } = proxy.$dict("D_TB_EMPNATURE");
const { D_BZ_AQRYWHCD } = proxy.$dict("D_BZ_AQRYWHCD");
const { D_TB_HEALTH } = proxy.$dict("D_TB_HEALTH");
const props = defineProps({
  addDiaShow: {
    type: Boolean,
    default: false
  },
  editObj: {
    type: Object,
    default: () => { }
  },
  configobj: { type: Object, default: () => { } }
});
const emit = defineEmits("changePage");
const data = reactive({
  fromObj: {},
  img: [],
  tableData: [],
  tbDriverSituatiList: [], //主要驾驶情况表
  tbDriverDftList: [], //驾驶员家庭情况表
  tbDriverDwrrfList: [], //驾驶员受奖励登记表
  tbDriverLarList: [], //驾照审核记录表
  tbDriverMdeatlrfList: [], //主要驾驶经历及证照登记表
  tbDriverRfohardList: [], //	驾驶员肇事登记表
  tbDriverSkillAwardsList: [], //驾驶员技能比赛获奖
  tbDriverTeerfList: [], //机动车驾驶员调入、借用、聘用考核登记表
  tbDriverPxjlList: [], //驾驶员培训记录表
  tbDriverWadcList: [], //驾驶员工作简历
  famaly: [], //家庭主要成员
  love: {}, //爱人
  config: {
    title: "",
    saveBtnShow: true,
    wbjlShow: false,
    jcrzShow: false
  }
});

//获取详情
function getmain(id) {
  if (id) {
    //查询驾驶员信息表详情
    getApi({ id: id }, "/mosty-jcgl/driver/queryDriverFileById").then((res) => {
      if (res) {
        data.fromObj = res ? res : [];
      }
    });
    //查询驾驶经历及证照登记表详情
    getApi(
      { id: id },
      "/mosty-jcgl/DriverMdeatlrf/queryDriverMdeatlrfById"
    ).then((res) => {
      if (res) {
        data.tbDriverMdeatlrfList = res ? res : [];
        getimg(data.tbDriverMdeatlrfList.drivinglicencefile, 0)
        getimg(data.tbDriverMdeatlrfList.drivinglicenceReverseflie, 1)
      }
    });
    //查询驾驶员工作简历详情
    getApi({ id: id }, "/mosty-jcgl/driverWadc/queryDriverWadcById").then(
      (res) => {
        if (res) {

          data.tbDriverWadcList = res ? res : [];
          data.tbDriverWadcList.forEach((item) => {
            item.time = item.begindate + '-' + item.enddate
          })
        }
      }
    );
    //主要驾驶情况详情
    getApi({ id: id }, "/mosty-jcgl/driverSituati/queryDriverSituatiById").then(
      (res) => {
        if (res) {

          data.tbDriverSituatiList = res ? res : [];
          data.tbDriverSituatiList.forEach((item) => {
            item.time = item.begindate + '-' + item.enddate
          })
        }
      }
    );
    //查询机动车驾驶员调入、借用、聘用考核登记表详情
    getApi({ id: id }, "/mosty-jcgl/driverTeerf/queryDriverTeerfById").then(
      (res) => {
        if (res) {
          data.tbDriverTeerfList = res ? res : [];
        }
      }
    );
    //查询驾驶员受奖励登记表详情
    getApi({ id: id }, "/mosty-jcgl/driverDwrrf/queryDriverDwrrfById").then(
      (res) => {
        if (res) {
          data.tbDriverDwrrfList = res ? res : [];
        }
      }
    );
    //查询驾驶员肇事登记表详情
    getApi({ id: id }, "/mosty-jcgl/driverRfohard/queryDriverRfohardById").then(
      (res) => {
        if (res) {
          data.tbDriverRfohardList = res ? res : [];
        }
      }
    );
    //查询驾驶员家庭情况表详情
    getApi({ id: id }, "/mosty-jcgl/driverDft/queryDriverDftById").then((res) => {
      if (res) {
        // data.tbDriverDftList = res ? res : [];
        if (res.length) {
          res.forEach(item => {
            if (item.impact == "1") {
              data.love = item
            }
          })

          data.famaly = res.filter(item => {
            return item.impact != "1"
          })

        }
      }
    });

    //查询驾驶员培训记录表详情
    getApi({ driverUserId: id }, "/mosty-jcgl/aqxx/getUserAqxx").then(
      (res) => {
        if (res) {
          data.tbDriverPxjlList = res ? res : [];
        }
      }
    );
  }
}
const black = () => {
  emit("changePage", "Main");
};
const getimg = (id, index) => {
  if (id) {
    getApi({}, `/mosty-base/minio/file/download/${id}`).then(
      (res) => {
        if (res) {
          data.img[index] = res.url;
        }
      }
    );
  }
};
onMounted(() => {
  getmain(props.editObj.id);
});
watchEffect(() => {
  if (props.editObj) {
    data.config = JSON.parse(JSON.stringify(props.editObj));
  }
});
</script>

<style lang="scss" scoped>
.ontds {
  >td {
    width: 10%;
  }
}

.desc {
  display: flex;
  width: 1274px;
  margin-left: 20px;
  margin-top: 20px;
}

td {
  text-align: center;
  height: 50px;
}

::v-deep .el-cascader,
::v-deep .el-select {
  width: 100%;
}

.Box {
  margin: 10px auto;
  width: 1300px;
  color: black;
  font-size: 20px;

  .title {
    text-align: center;
    margin-top: 20px;
    font-size: 25px;
    font-weight: 700;
  }
}

.xsl {
  height: calc(100vh - 23vh);
  overflow-y: scroll;
}

::v-deep .el-descriptions__cell {
  width: 174px !important;
}
</style>