<template>
  <div>
    <xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="`查看`" :form="form" :rules="rules"
      @submit="submit">
<!-- ${type_name} -->
      <template v-slot:steps>
        <el-steps :active="steps_active" finish-status="success" direction="vertical">
          <el-step title="问题描述"></el-step>
          <el-step title="整改措施"></el-step>
          <!-- <el-step title="整改接收"></el-step> -->
          <el-step title="整改反馈"></el-step>
          <!-- <el-step title="审核"></el-step> -->
        </el-steps>
      </template>
      <!-- 填报信息 -->
      <template v-slot:contents>
      <div id='print'>
        <div>
          <el-divider>问题描述</el-divider>
          <div>
            <el-descriptions class="margin-top" :column="3" border>
              <el-descriptions-item>
                <template slot="label">
                  任务名称
                </template>
                {{showform.mission_id===0?"日常巡查":(showform.mission?showform.mission.name:'')}}
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  状态
                </template>
                {{showform.status_name?showform.status_name:''}}
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  上报人
                </template>
                {{showform.admin?showform.admin.name:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  问题描述
                </template>
                {{showform.ask_introduce?showform.ask_introduce:''}}
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  发现时间
                </template>
                {{showform.date}}
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  问题类型
                </template>
                {{showform.ask?showform.ask.value:''}}
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  检查地点
                </template>
                {{showform.site?showform.site.name:(showform.address?showform.address:'')}}
              </el-descriptions-item>
              <el-descriptions-item span='4' v-if="showgroups">
                <template slot="label">
                  小组
                </template>
                <div>
                  {{groupObj.name}}
                  <el-tag style="margin-right:5px" v-for="item in groupObj.details">{{item.name}}</el-tag>
                </div>
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  建议责任科室
                </template>
                {{showform.ask_department?showform.ask_department:''}}
              </el-descriptions-item>


              <el-descriptions-item span='4'>
                <template slot="label">
                  整改建议
                </template>
                {{showform.tips?showform.tips:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  附件
                </template>
                <el-image v-for="url in showurl"
                  style="width: 146px; height: 146px;display:inline-block;margin-right:5px;margin-bottom:5px" :src="url"
                  :preview-src-list="showurl">
                </el-image>
              </el-descriptions-item>
            </el-descriptions>
          </div>
        </div>
<!-- 整改意见 -->
        <div>
          <el-divider>整改措施</el-divider>
          <div v-if="(showform.status==0||showform.status==8||showform.status==1)&&(is_guiji||is_chuzhang)||is_admin"   style="border: 5px solid #8CC5FF;">
            <el-descriptions class="margin-top" :column="4">
              <el-descriptions-item span="2" :labelStyle="{'display':'none'}" contentClassName="wraps" :colon='false'>
                <div style="display: flex;width:100%;padding-bottom:12px">
                    <div style="margin-right:10px;min-width: 120px;text-align: right;">
                      <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>需否整改：
                    </div>
                  <div>
                    <el-select v-model="checkstatus" @change="changeCheck" filterable clearable placeholder="请选择需否整改" style="width: 300px;">
                      <el-option v-for="item in checkList" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </div>
                <div style="display: flex;width:100%;padding-bottom:12px">
                    <div style="margin-right:10px;min-width: 120px;text-align: right;">
                      <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>整改意见：
                    </div>
                  <div>
                    <el-select v-model="form.deal_id" filterable clearable placeholder="请选择整改意见" style="width: 300px;">
                      <el-option v-for="item in fixList" :key="item.id" :label="item.value" :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </div>
                <div  style="display: flex;width:100%;">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">备注：
                  </div>
                  <div>
                    <el-input v-model="form.check_remark" :rows='2' type='textarea' placeholder="请输入备注" clearable
                      style="width: 300px;"></el-input>
                  </div>
                </div>

                <div  style="display: flex;width:100%;">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">分管领导确认：
                  </div>

                  <div>
                    <el-radio-group v-model="form.check_leader">
                      <el-radio :label="0">否</el-radio>
                      <el-radio :label="1">是</el-radio>
                    </el-radio-group>
                  </div>
                </div>
                <div style="display: flex;width:100%;padding-bottom:12px" v-if="form.check_leader==1">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">
                    <span style="color:red;font-weight: 600;padding-right: 4px;">*</span>需否整改：
                  </div>
                  <div>
                    <el-select v-model="form.leader_status" filterable placeholder="请选择需否整改" style="width: 300px;">
                      <el-option v-for="item in leaderCheckList" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </div>
                <div  style="display: flex;width:100%;" v-if="form.check_leader==1">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">备注：
                  </div>
                  <div>
                    <el-input v-model="form.check_leader_remark" :rows='2' type='textarea' placeholder="请输入备注" clearable
                      style="width: 300px;"></el-input>
                  </div>
                </div>


                <div  style="display: flex;width:100%;">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">主要领导确认：
                  </div>
                  <div>
                    <el-radio-group v-model="form.check_main">
                      <el-radio :label="0">否</el-radio>
                      <el-radio :label="1">是</el-radio>
                    </el-radio-group>
                  </div>
                </div>
                <div style="display: flex;width:100%;padding-bottom:12px" v-if="form.check_main==1">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;color:rgba(0,0,0,0.6)">
                    <span style="color:red;font-weight: 600;padding-right: 4px;">*</span>需否整改：
                  </div>
                  <div>
                    <el-select v-model="form.main_status"  filterable placeholder="请选择需否整改" style="width: 300px;">
                      <el-option v-for="item in leaderCheckList" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </div>
                <div  style="display: flex;width:100%;color:rgba(0,0,0,0.6)" v-if="form.check_main==1">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">备注：
                  </div>
                  <div>
                    <el-input v-model="form.check_main_remark" :rows='2' type='textarea' placeholder="请输入备注" clearable
                      style="width: 300px;"></el-input>
                  </div>
                </div>

              </el-descriptions-item>

              <el-descriptions-item span="2" :labelStyle="{'display':'none'}" :contentStyle="{'flex-wrap':'wrap'}">
                <template slot="label">
                  <!-- 选择 -->
                </template>
                <div  style="display: flex;width:100%;margin-left:11px;">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">安全隐患：
                  </div>
                  <div>
                    <el-radio-group v-model="form.is_hidden">
                      <el-radio :label="0">一般隐患</el-radio>
                      <el-radio :label="1">重大隐患</el-radio>
                    </el-radio-group>
                  </div>
                </div>
                <div  style="display: flex;width:100%;margin-left:11px;padding-bottom: 12px;">
                  <div style="margin-right:10px;min-width: 120px;text-align: right;">责任对象选择：
                  </div>
                  <div>
                    <el-radio-group v-model="form.name7" @change='changeName7'>
                      <el-radio :label="2">部门</el-radio>
                      <el-radio :label="1">人员</el-radio>
                    </el-radio-group>
                    <div v-if="form.name7==2" >
                      <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
                      </el-checkbox>
                      <div style="margin: 15px 0;"></div>
                      <el-checkbox-group v-model="form.accept_department_ids" @change="handleCheckedDeptChange">
                        <el-checkbox @change="handleCheckedDeptSingleChange" v-for="dept in deptOptions" :label="dept.id"
                          :key="dept.id">{{dept.name}}</el-checkbox>
                      </el-checkbox-group>
                    </div>
                    <div v-if="form.name7==1">
                      <!-- <el-select style="width:300px" v-model="form.accept_admin_ids" clearable filterable multiple placeholder="请选择人员">
                        <el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                      </el-select> -->
                      <el-select-tree :datas='userdata' :valueArr='valueArr' :valueMultiple="valueMultiple" @getValue="getSelectedValue"></el-select-tree>

                      <!-- <el-transfer filterable :titles="['待选择', '已选择']" :props="{key: 'id',label: 'name'}"
                        :filter-method="filterMethod" :format="{ noChecked: '${total}',hasChecked: '${checked}/${total}' }"
                        filter-placeholder="请选择参与对象" v-model="form.accept_admin_ids" :data="userdata">
                      </el-transfer> -->
                    </div>
                  </div>

                </div>



              </el-descriptions-item>

            </el-descriptions>
          </div>
          <div v-else>
            <el-descriptions class="margin-top" :column="3" border>
              <el-descriptions-item>
                <template slot="label">
                  确认结果
                </template>
                <div>
                  <span v-if='showform.status==6'>
                    退回
                  </span>
                  <span v-else-if="showform.status==0||showform.status==8">
                    待确认
                  </span>
                  <span v-else-if="showform.status==1">
                    待领导确认
                  </span>
                  <span v-else-if="showform.status==-1">

                  </span>
                  <span v-else>
                    需整改
                  </span>
                </div>
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  分管领导确认
                </template>
                <span v-if="showform.status==1&&showform.check_leader==1&&(showform.leader_status===null)">
                  待确认
                </span>
                <span v-else>
                  {{showform.check_leader==1?(showform.leader_status==1?'需整改':'退回'):'--'}}
                </span>
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  主要领导确认
                </template>
                <span v-if="showform.status==1&&showform.check_main==1&&(showform.main_status===null)">
                  待确认
                </span>
                <span v-else>
                  {{showform.check_main==1?(showform.main_status==1?'需整改':'退回'):'--'}}
                </span>
              </el-descriptions-item>
              <el-descriptions-item span='2'>
                <template slot="label">
                  责任对象
                </template>
                <div v-if="showform.accept_admin_ids_details&&showform.accept_admin_ids_details.length>0">
                  <el-tag style='margin:5px' v-for='item in showform.accept_admin_ids_details'>
                    {{item.name}}
                  </el-tag>
                </div>
                <div v-if="showform.accept_department_ids_details&&showform.accept_department_ids_details.length>0">
                  <el-tag style='margin:5px' v-for='item in showform.accept_department_ids_details'>
                    {{item.name}}
                  </el-tag>
                </div>
              </el-descriptions-item>
              <el-descriptions-item span='2'>
                <template slot="label">
                  安全隐患
                </template>
                {{showform.is_hidden===null?'':(showform.is_hidden===1?'重大隐患':'一般隐患')}}
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  备注
                </template>
                {{showform.check_remark?showform.check_remark:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4' v-if="showform.check_leader==1&&showform.leader_status!=null">
                <template slot="label">
                  分管领导备注
                </template>
                {{showform.check_leader_remark?showform.check_leader_remark:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4' v-if="showform.check_main==1&&showform.main_status!=null">
                <template slot="label">
                  主要领导备注
                </template>
                {{showform.check_main_remark?showform.check_main_remark:''}}
              </el-descriptions-item>

            </el-descriptions>
          </div>
        </div>
<!-- 整改接收 -->
       <!-- <div>
          <el-divider>整改接收</el-divider>
          <div v-if="(showform.status==2&&is_myself)||is_admin"  style="border: 5px solid #8CC5FF;">
            <div>
              <el-descriptions class="margin-top" :column="4">
                <el-descriptions-item span="4">
                  <template slot="label">
                    <div>
                      <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否接收
                    </div>

                  </template>
                  <div>
                    <el-select @change='changeAcceptStatus' v-model="acceptStatus" filterable clearable placeholder="请选择是否接收"
                      style="width: 300px;">
                      <el-option v-for="item in acceptList" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="4" v-if="(showTarget&&showform.status==2)||is_admin">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>计划完成日期
                  </template>
                  <div>
                    <el-date-picker style="width: 300px;" v-model="form.plan_end_date" format="yyyy-MM-dd"
                      value-format="yyyy-MM-dd" type="date" placeholder="选择计划完成日期">
                    </el-date-picker>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="4" v-if="(showTarget&&showform.status==2)||is_admin">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;"></span>责任人
                  </template>
                  <div>
                    <el-select v-model="form.duty_admin_id" filterable clearable placeholder="请选择责任人" style="width: 300px;">
                      <el-option v-for="item in userdatabefore" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="2" v-if="(showTarget&&showform.status==2)||is_admin">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;"></span>整改目标
                  </template>
                  <div>
                    <el-input v-model="form.target" :rows='2' type='textarea' placeholder="请输入整改目标" clearable
                      style="width: 300px;"></el-input>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="2" v-if="(showReason&&showform.status==2)||is_admin">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;"></span>退回原因
                  </template>
                  <div>
                    <el-input v-model="form.reason" :rows='2' type='textarea' placeholder="请输入退回原因" clearable
                      style="width: 300px;"></el-input>
                  </div>
                </el-descriptions-item>
              </el-descriptions>
            </div>
          </div>
          <div v-else>
            <el-descriptions class="margin-top" :column="3" border>
              <el-descriptions-item :span="showform.status==8?'4':''">
                <template slot="label">
                  接收结果
                </template>
                <div>
                  <span ></span>
                  <span v-if='showform.status==8'>
                    退回
                  </span>
                  <span v-else-if="showform.status==3||showform.status==4||showform.status==5||showform.status==7||showform.status==9">
                    已接收
                  </span>
                  <span v-else>

                  </span>
                </div>
              </el-descriptions-item>
              <template v-if="showform.status==8">
                <el-descriptions-item :span="showform.status==8?'4':''">
                  <template slot="label">
                    退回原因
                  </template>
                  {{showform.reason?showform.reason:''}}
                </el-descriptions-item>
              </template>
              <template v-if="showform.status!=8">
                <el-descriptions-item>
                  <template slot="label">
                    计划时间
                  </template>
                  {{showform.plan_end_date?showform.plan_end_date:''}}
                </el-descriptions-item>
                <el-descriptions-item>
                  <template slot="label">
                    责任人
                  </template>
                  {{showform.duty_admin?showform.duty_admin.name:''}}
                </el-descriptions-item>
              </template>
              <template v-if="showform.status!=8">
                <el-descriptions-item span="4">
                  <template slot="label">
                    整改目标
                  </template>
                  {{showform.target?showform.target:''}}
                </el-descriptions-item>
              </template>

            </el-descriptions>
          </div>
        </div>
        --><!-- 整改反馈 -->
        <div>
          <el-divider>整改反馈</el-divider>
          <div v-if="((showform.status==3||showform.status==7||showform.status==4)&&is_myself)||is_admin" style="border: 5px solid #8CC5FF;">
            <div>
              <el-descriptions class="margin-top" :column="4">
                <el-descriptions-item span="2">
                  <template slot="label">
                    <div>
                      <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>完成情况
                    </div>
                  </template>
                  <div>
                    <el-radio-group v-model="form.fix_status">
                      <el-radio :label="1">已完成</el-radio>
                      <el-radio :label="0">已列计划</el-radio>
                    </el-radio-group>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="2">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>时间
                  </template>
                  <div>
                    <el-date-picker format="yyyy-MM-dd" style="width: 300px;" v-model="form.fix_end_date"
                      value-format="yyyy-MM-dd" type="date" placeholder="选择时间">
                    </el-date-picker>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="4">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>整改说明
                  </template>
                  <div>
                    <el-input v-model="form.fix_introduce" :rows='2' type='textarea' placeholder="请输入整改说明" clearable
                      style="width: 300px;"></el-input>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="4">
                  <template slot="label">
                    <span style="color: red;font-weight: 600;padding-right: 4px;"></span>整改附件
                  </template>
                  <div>
                    <el-upload :action="action" class='upload-demo' list-type="picture-card" :file-list="pictureList"
                      ref="pictureUpload" style="width:600px" :auto-upload="true" :data="uploadOther"
                      :on-preview="handlePictureCardPreview" :on-success="handlesuccess" :on-remove="handleRemove">
                      <i class="el-icon-plus"></i>
                    </el-upload>
                  </div>
                </el-descriptions-item>
              </el-descriptions>
            </div>
          </div>
          <div v-else>
            <el-descriptions class="margin-top" :column="3" border>
              <el-descriptions-item>
                <template slot="label">
                  完成情况
                </template>
                {{showform.fix_status===null?'':(showform.fix_status==1?'已完成':'已列计划')}}
              </el-descriptions-item>
              <el-descriptions-item span='2'>
                <template slot="label">
                  时间
                </template>
                {{showform.fix_end_date?showform.fix_end_date:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  整改说明
                </template>
                {{form.fix_introduce?form.fix_introduce:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  整改附件
                </template>
                <el-image v-for="url in showfixurl"
                  style="width: 146px; height: 146px;display:inline-block;margin-right:5px;margin-bottom:5px" :src="url"
                  :preview-src-list="showfixurl">
                </el-image>
              </el-descriptions-item>
            </el-descriptions>
          </div>
        </div>
        <!-- 审核 -->
      <!--  <div>
          <el-divider>审核</el-divider>
          <div v-if="((showform.status==4||showform.status==9)&&(is_guiji||is_chuzhang))||is_admin"  style="border: 5px solid #8CC5FF;">
            <div>
              <el-descriptions class="margin-top" :column="4">
                <el-descriptions-item span="2" :labelStyle="{'display':'none'}" contentClassName="wraps" :colon='false'>
                  <div style="display: flex;width:100%;padding-bottom:12px">
                      <div style="margin-right:10px;min-width: 120px;text-align: right;">
                        <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>审核结果：
                      </div>
                    <div>
                      <el-select @change="changeConfirmStatus" v-model="confirmStatus" filterable clearable placeholder="请选择审核结果" style="width: 300px;">
                        <el-option v-for="item in confirmList" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                      </el-select>
                    </div>
                  </div>
                  <div  style="display: flex;width:100%;padding-bottom:12px">
                    <div style="margin-right:10px;min-width: 120px;text-align: right;">备注：

                    </div>
                    <div>
                      <el-input v-model="form.re_remark" :rows='2' type='textarea' placeholder="请输入备注" clearable
                        style="width: 300px;"></el-input>
                    </div>
                  </div>
                </el-descriptions-item>
                <el-descriptions-item span="2" :labelStyle="{'display':'none'}" contentClassName="wraps" :colon='false'>
                  <div  style="display: flex;width:100%;">
                    <div style="margin-right:10px;min-width: 120px;text-align: right;">分管领导审核：
                    </div>

                    <div>
                      <el-radio-group v-model="form.re_check_leader">
                        <el-radio :label="0">否</el-radio>
                        <el-radio :label="1">是</el-radio>
                      </el-radio-group>
                    </div>
                  </div>
                  <div style="display: flex;width:100%;padding-bottom:12px" v-if="form.re_check_leader==1">
                    <div  style="margin-right:10px;min-width: 120px;text-align: right;">
                      <span style="color: red;font-weight: 600;padding-right: 4px;"></span>审核结果：
                    </div>
                    <div>
                      <el-select style="width: 300px;"
                       v-model="form.re_leader_status" filterable placeholder="请选择审核结果">
                        <el-option v-for="item in leaderConfirmList" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                      </el-select>
                    </div>
                  </div>
                  <div  style="display: flex;width:100%;padding-bottom:12px" v-if="form.re_check_leader==1">
                    <div   style="margin-right:10px;min-width: 120px;text-align: right;">备注：
                    </div>
                    <div>
                      <el-input v-model="form.re_leader_remark" :rows='2' type='textarea' placeholder="请输入备注" clearable
                        style="width: 300px;"></el-input>
                    </div>
                  </div>
                  <div  style="display: flex;width:100%;">
                    <div style="display: flex;">
                      <div style="margin-right:10px;min-width: 120px;text-align: right;">主要领导审核：
                      </div>
                      <div>
                        <el-radio-group v-model="form.re_check_main">
                          <el-radio :label="0">否</el-radio>
                          <el-radio :label="1">是</el-radio>
                        </el-radio-group>
                      </div>
                    </div>

                  </div>
                  <div>
                    <div v-if="form.re_check_main==1"  style="display: flex;padding-bottom:12px">
                      <div style="margin-right:10px;min-width: 120px;text-align: right;">
                        <span style="color: red;font-weight: 600;padding-right: 4px;"></span>审核结果：
                      </div>
                      <div>
                        <el-select style="width: 300px;"
                         v-model="form.re_main_status" filterable placeholder="请选择审核结果">
                          <el-option v-for="item in leaderConfirmList" :key="item.id" :label="item.name" :value="item.id">
                          </el-option>
                        </el-select>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div  v-if="form.re_check_main==1"
                      style="display: flex;padding-bottom:12px">
                      <div style="margin-right:10px;min-width: 120px;text-align: right;">备注
                      </div>
                      <div>
                        <el-input
                        v-model="form.re_main_remark" :rows='2' type='textarea' placeholder="请输入备注" clearable
                          style="width: 300px;"></el-input>
                      </div>
                    </div>

                  </div>

                </el-descriptions-item>
              </el-descriptions>
            </div>
          </div>
          <div v-else>
            <el-descriptions class="margin-top" :column="3" border>
              <el-descriptions-item>
                <template slot="label">
                  规计科审核
                </template>
                <div>
                  <span v-if='showform.status==5'>
                    整改通过
                  </span>
                  <span v-else-if="showform.status==7">
                    整改不通过,重新整改
                  </span>
                  <span v-else-if="showform.status==9">
                    待领导审核
                  </span>
                  <span v-else-if="showform.status==4">
                    待审核
                  </span>
                  <span v-else>
                    --
                  </span>
                </div>
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  分管领导审核
                </template>
                <span v-if="showform.status==9&&showform.re_check_leader==1&&showform.re_leader_status===null">
                  待审核
                </span>
                <span v-else>
                  {{showform.re_check_leader==1?(showform.re_leader_status==1?'通过':'不通过'):'--'}}
                </span>
              </el-descriptions-item>
              <el-descriptions-item>
                <template slot="label">
                  主要领导审核
                </template>
                <span v-if="showform.status==9&&showform.re_check_main==1&&showform.re_main_status===null">
                  待审核
                </span>
                <span v-else>
                  {{showform.re_check_main==1?(showform.re_main_status==1?'通过':'不通过'):'--'}}
                </span>
              </el-descriptions-item>
              <el-descriptions-item span='4'>
                <template slot="label">
                  备注
                </template>
                {{showform.re_remark?showform.re_remark:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4' v-if="showform.re_check_leader==1&&showform.re_leader_status!=null">
                <template slot="label">
                  分管领导备注
                </template>
                {{showform.re_leader_remark?showform.re_leader_remark:''}}
              </el-descriptions-item>
              <el-descriptions-item span='4' v-if="showform.re_check_main==1&&showform.re_main_status!=null">
                <template slot="label">
                  主要领导备注
                </template>
                {{showform.re_main_remark?showform.re_main_remark:''}}
              </el-descriptions-item>
            </el-descriptions>
          </div>
        </div>
      -->
      </div>
    </template>



      <template v-slot:footerContent>
        <div  style="display:flex;justify-content: space-between;">
          <Button  type="primary" v-print="'#print'" style='margin-left:5px;margin-bottom:5px;'>打印</Button>
          <div  style="display: inline-block;">
            <div v-if="((is_guiji||is_chuzhang||is_myself)&&(showform.status!=5&&showform.status!=6))||is_admin"  style="display: inline-block;">
              <Button type="primary"
                style='margin-left:5px;margin-bottom:5px;' @click="submit">确认</Button>
            </div>
            <Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false">取消</Button>

          </div>
        </div>

      </template>

    </xy-dialog>

    <el-dialog :visible.sync="showPic">
      <img width="100%" :src="showPicUrl" alt="">
    </el-dialog>

  </div>
</template>

<script>
  import {
    Message
  } from 'element-ui'
  import {
    getparameteritem
  } from "@/api/system/dictionary.js";
  import {
    save,
    get,
    del
  } from "@/api/task/patrol.js";
  import {
    listdept
  } from "@/api/system/department.js"
  import {
    listCommonuser
  } from "@/api/common.js"
  import {
    getToken
  } from '@/utils/auth'
  import {
    listunit
  } from "@/api/task/unit.js";
  import state from "@/store/modules/user.js"
import elSelectTree from '@/components/selectTree'
  export default {
    components: {
      elSelectTree
    },
    data() {
      return {
        isShow: false,
        type: 'add',
        typeNameList: {
          show: '查看',
          check: '审核',
          leader: '领导意见',
          accept: '接收',
          reform: '提交整改',
          confirm: '确认整改',
          leaderconfirm: '领导意见整改'
        },
        groupObj:{},
        showgroups:false,
        unitList:[],
        type_name: '',
        statusLabel:[
        //   {
        //   id:-1,
        //   value:'已撤回'
        // },
        {
          id:0,
          value:'整改中'
        },{
          id:1,
          value:'整改中'
        },{
          id:3,
          value:'整改中'
        },{
          id:4,
          value:'整改中'
        },{
          id:5,
          value:'已整改'
        },{
          id:6,
          value:'退回'
        },{
          id:7,
          value:'整改中'
        },{
          id:8,
          value:'整改中'
        },{
          id:9,
          value:'整改中'
        }],
        statusList: [
        //   {
        //   id: -1,
        //   value: '已撤回'
        // },
        {
          id: 0,
          value: '待确认'
        }, {
          id: 1,
          value: '待领导确认'
        }, {
          id: 2,
          value: '已分发,待接收'
        }, {
          id: 3,
          value: '已接收'
        }, {
          id: 4,
          value: '提交整改'
        }, {
          id: 5,
          value: '已整改'
        }, {
          id: 6,
          value: '退回'
        }, {
          id: 7,
          value: '整改不通过,重新整改'
        }, {
          id: 8,
          value: '部门退回'
        }, {
          id: 9,
          value: '待领导审核'
        }],
        id: '',
        uploadOther: {
          token: ""
        },
        action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
        pictureList: [],
        showPic: false,
        showPicUrl: '',


        showform: {},
        showurl: [],
        showfixurl: [],
        steps_active: 1,
        showReason:true,
        showTarget:true,
        fixList:[],
        form: {
          steps: '',
          contents:'',

          status: '',
          is_hidden:null,
          deal_id:'',
          check_leader: '',
          check_main: '',
          leader_status: '',
          main_status: '',
          name7: 2,
          accept_department_ids: [],
          accept_admin_ids: [],
          accept_status: '',
          plan_end_date: '',
          duty_admin_id: '',
          reason: '',

          accept_admin_name: "",
          plan_end_date_name: '',
          duty_admin_name: '',
          fix_status: '',
          fix_end_date: '',
          fix_introduce: '',
          fix_file_ids: [],
          confirm_status: '',
          re_check_leader: 0,
          re_check_main: 0,
          re_leader_status: '',
          re_main_status: '',


          mission_id: '',
          date: '',
          site_id: '',
          ask_id: '',
          ask_introduce: '',
          tips: '',
          file_ids: [],
        },

        // checkList: [{
        //   id: 2,
        //   name: '是'
        // }, {
        //   id: 6,
        //   name: '否'
        // }],
        checkstatus:3,
        checkList: [{
          id: 3,
          name: '是'
        }, {
          id: 6,
          name: '否'
        }],
        confirmStatus:1,
        confirmList: [{
          id: 1,
          name: '通过'
        }, {
          id: 0,
          name: '不通过'
        }],
        leaderCheckList: [{
          id: 1,
          name: '是'
        }, {
          id: 0,
          name: '否'
        }],
        leaderConfirmList: [{
          id: 1,
          name: '通过'
        }, {
          id: 0,
          name: '不通过'
        }],
        acceptStatus:1,
        acceptList: [{
          id: 1,
          name: '是'
        }, {
          id: 0,
          name: '否'
        }],
        deptOptions: [],
        checkAll: false,
        isIndeterminate: true,
        userdata: [],
        userdatabefore:[],
        valueMultiple:[],
        valueArr:[],
        filterMethod(query, item) {
          return item.name.indexOf(query) > -1;
        },

        rules: {
          // status: [{
          //   required: true,
          //   message: '请选择状态'
          // }]
        },
        login_id:'',
        department_id:'',
        is_myself:false,
        is_leader: false,
        is_main_leader: false,
        is_guiji: false,
        is_chuzhang: false,
        is_admin:false
      }
    },
    created() {
      this.uploadOther.token = getToken();
      this.getLeads()
      this.getUnit()
      this.getFixList()
      this.loadDeptOptions()
      this.loadUser()
    },
    methods: {
      async getLeads(){
        // await this.$store.dispatch("user/getLeads")
         let obj = state.state
         console.log("obj",obj)
         this.login_id = obj.login_id
         this.department_id = obj.department_id
         this.leads_list = obj.leads_list
         this.is_guiji = obj.is_guiji
         this.is_chuzhang = obj.is_chuzhang
         this.is_leader = obj.is_leader
         this.is_main_leader = obj.is_main_leader
         this.is_admin = obj.is_admin
         // const res = await leads()
         // console.log("this.login_id",this.login_id)
         // this.leads_list = res
         // // 登陆人是否是规计科
         // for(var g of res.guiji){
         //   if(this.login_id==g.id){
         //     this.is_guiji = true
         //   }
         // }
         // // 登陆人是否是处长室
         // for(var c of res.chuzhang){
         //   if(this.login_id==c.id){
         //     this.is_chuzhang = true
         //   }
         // }
         // // 是否分管领导
         // if(this.login_id==res.guiji_leader.id){
         //   this.is_leader = true
         // }
         // // 是否处长
         // if(this.login_id==res.chuzhang_leader.id){
         //   this.is_main_leader = true
         // }

      },
      print () {
        this.$Print('#print');
      },
      deleteList(id) {
        var that = this;
        if (id) {
          del(id).then(response => {
            this.$Message.success('操作成功');
            this.isShow = false
            this.$emit('refresh')
          }).catch(error => {
            console.log(error)
            reject(error)
          })
        }
      },
      //切换用户选择 人员还是部门 清空
      changeName7(e) {
        if (e) {
          this.form.accept_department_ids = []
          this.form.accept_admin_ids = []
          this.valueArr = []
          this.valueMultiple = []
          this.$forceUpdate()
        }
      },
      changeCheck(e){
        if(e){
          this.form.status = e
        }
      },
      changeConfirmStatus(e){
        if(e){
          if(e==1){
            this.form.status=5
          }else if(e===0){
            this.form.status=7
          }
        }
      },
      // 切换接收的状态 清空
      changeAcceptStatus(e) {
        console.log(e)
        if(e){
          this.form.duty_admin_id = ''
          this.form.reason = ''
          this.form.target = ''
          this.form.plan_end_date = ''
          if (e==1) {
            this.showTarget = true
            this.showReason = false
            this.form.status=3
          }else if(e===0){
            this.showReason = true
            this.showTarget = false
            this.form.status=8
          }
        }else{
          this.showReason = true
          this.showTarget = true
        }

      },
      // 选择科室
      loadDeptOptions() {
        listdept().
        then((res) => {
          for (var m of res) {
            m.checked = false;
          }
          this.deptOptions = res;
        }).catch(error => {
          console.log(error)
          reject(error)
        })
      },
      loadUser() {
        listCommonuser({
          page_size: 999,
        }).
        then((res) => {
          // this.userdata = res.data ? res.data.reverse() : [];
          let data = res.data ? res.data.reverse() : [];
          this.userdatabefore = res.data ? res.data : [];
          let contactData = this.contactUser(data)
          this.userdata = this.sortDepartment(contactData,'department_id')
          console.log("this.userdata",this.userdata)
        }).catch(error => {
          console.log(error)
        })
      },
      getSelectedValue (value) {
          console.log('选中的结果值', value)
          if(value.length>0){
            value.map(item=>{
              this.form.accept_admin_ids.push(item.id)
            })
          }else{
            this.form.accept_admin_ids = []
          }
        },
      contactUser(arr) {
        let tempArr = [],
          newArr = []
        for (let i = 0; i < arr.length; i++) {
          if (tempArr.indexOf(arr[i].department_id) === -1) {
            newArr.push({
              department_id: arr[i].department_id,
              name: arr[i]['department']['name'],
              children: [arr[i]]
            })
            tempArr.push(arr[i].department_id);
          } else {
            for (let j = 0; j < newArr.length; j++) {
              if (newArr[j].department_id == arr[i].department_id) {
                newArr[j].children.push(arr[i])
              }
            }
          }
        }
        return newArr
      },
      sortDepartment(arr,key){
        return arr.sort(function(a,b){
          var x = a[key]
          var y = b[key]
          return ((x<y)?-1:(x>y)?1:0)
        })
      },
      handleCheckAllChange(val) {
        let options = [];
        for (var m of this.deptOptions) {
          options.push(m.id);
        }
        this.form.accept_department_ids = val ? options : [];
        this.isIndeterminate = false;
      },
      handleCheckedDeptSingleChange(v) {
        //如果出现取消的操作 就要执行删除
        console.log(v);
        var that = this;
        if (this.form.accept_department_ids)
          that.delDeptItem();

      },
      //删除操作
      delDeptItem() {
        for (var m of this.deptOptions) {
          if (this.form.accept_department_ids.indexOf(m.id) == -1) {
            var d = this.form.accept_department_ids.filter(function(t) {
              return t.department_id == m.id;
            })

            if (d.length != 0) {
              delDep(d[0].id).then(response => {}).catch(error => {
                console.log(error)
              })
            }

          }
        }
      },
      handleCheckedDeptChange(value) {
        let checkedCount = value.length;
        this.checkAll = checkedCount === this.deptOptions.length;
        this.isIndeterminate = checkedCount > 0 && checkedCount < this.deptOptions.length;
      },

      handleRemove(file, fileList) {
        this.pictureList = fileList
      },
      handlesuccess(response, file, fileList) {
        this.pictureList = fileList
      },
      handlePictureCardPreview(file) {
        this.showPicUrl = file.url;
        this.showPic = true;
      },
      async getFixList() {
        const res = await getparameteritem('fix_options')
        this.fixList = res.detail
      },
      async getUnit() {
        const res = await getparameteritem('unitTypeList')
        for(var  k of res.detail){
          if(k.remark=='检查'){
            const res1 = await listunit({
              page:1,
              page_size:9999,
              unit_type:k.id,
            })
            this.unitList = res1.data
          }
        }
      },
      getGroups(e,login_id,department_id){
        this.groupObj = {}
        this.showgroups = false
        this.unitList.map(item=>{
          if(item.id==e){
            if(item.groups&&item.groups.length>0){
              let arr = {}
              item.groups.map(g=>{
                arr['name'] = g.name
                if(g.details&&g.details.length>0){
                  if(g.type==2){
                    g.details.map(d=>{
                      if(d.id==department_id){
                        arr['details'] = g.details
                      }
                    })
                  }
                  if(g.type==1){
                    g.details.map(d=>{
                      if(d.id==login_id){
                        arr['details'] = g.details
                      }
                    })
                  }
                }
              })
              console.log("arr",arr)
              this.groupObj = arr
              this.showgroups = true
            }
          }
        })
      },
      async getDetail() {
        const res = await get(this.id)

        // 选择人或部门
        let name7value = 2
        // if (res.accept_department_ids) {
        //   name7value = res.accept_department_ids.length > 0 ? 2 : 2
        // } else if (res.accept_admin_ids) {
        //   name7value =
        // } else {
        //   name7value = 2
        // }

        // this.form.name7 = res.accept_department_ids.length > 0 ? 2 : (res.accept_admin_ids.length > 0 ? 1 : 2)
        if(res.accept_department_ids && res.accept_admin_ids){
          name7value = res.accept_department_ids.length > 0 ? 2 : (res.accept_admin_ids.length > 0 ? 1 : 2)
        }else{
          name7value = 2
        }
        this.form = {
          steps: '',
          contents:'',

          // 审核
          status: res?.status,
          accept_status: '',
          deal_id:res?.deal_id,
          check_leader: res.check_leader == 1 ? 1 : 0,
          check_main: res.check_main == 1 ? 1 : 0,
          is_hidden:res?.is_hidden,
          // leader_status: res.leader_status == 1 ? 1 : 0,
          // main_status: res.main_status == 1 ? 1 : 0,
          leader_status: res?.leader_status,
          main_status: res?.main_status,
          name7: name7value,
          accept_department_ids: res.accept_department_ids?res.accept_department_ids:[],
          accept_admin_ids: res.accept_admin_ids?res.accept_admin_ids:[],
          accept_status: '',
          plan_end_date: res?.plan_end_date,
          duty_admin_id: res?.duty_admin_id,
          reason: res?.reason,

          accept_admin_name: "",
          plan_end_date_name: '',
          duty_admin_name: '',
          fix_status: res?.fix_status,
          fix_end_date: res?.fix_end_date,
          fix_introduce: res?.fix_introduce,
          fix_file_ids: res?.fix_file_ids,
          confirm_status: '',
          re_check_leader: res.re_check_leader == 1 ? 1 : 0,
          re_check_main: res.re_check_main == 1 ? 1 : 0,
          // re_leader_status: res.re_leader_status == 1 ? 1 : 0,
          // re_main_status: res.re_main_status == 1 ? 1 : 0,
          re_leader_status: res?.re_leader_status,
          re_main_status: res?.re_main_status,
          target:res?.target,
          check_remark:res?.check_remark,
          check_leader_remark:res?.check_leader_remark,
          check_main_remark:res?.check_main_remark,
          re_remark:res?.re_remark,
          re_leader_remark:res?.re_leader_remark,
          re_main_remark:res?.re_main_remark,




          mission_id: res?.mission_id,
          date: res?.date,
          site_id: res?.site_id,
          ask_id: res?.ask_id,
          ask_introduce: res?.ask_introduce,
          tips: res?.tips,
          file_ids: res?.file_ids,
        }

        for (var f of res.files) {
          this.showurl.push(f.url)
        }
        for (var f of res.fix_files) {
          this.pictureList.push({
            url: f.url,
            id: f.id,
            name: f.original_name
          })
          this.showfixurl.push(f.url)
        }

        //  判断该问题下发给的人 是否为登陆人
        if(res.accept_admin_ids&&res.accept_admin_ids.length>0){
          for(var a of res.accept_admin_ids){
            if(this.login_id==a){
              this.is_myself = true
            }
          }
          this.userdatabefore.map(item=>{
            res.accept_admin_ids.map(item1=>{
              if(item.id==item1){
                this.valueMultiple.push(item)
              }
            })
          })
          this.valueArr = res.accept_admin_ids
          console.log("this.valueMultiple",this.valueMultiple)
          this.$forceUpdate()
        }
        if(res.accept_department_ids&&res.accept_department_ids.length>0){
          for(var d of res.accept_department_ids){
            if(this.department_id==d){
              this.is_myself = true
            }
          }
        }



        console.log("this.is_myself",this.is_myself)
        // 流程步骤
        if (res.status == 4 || res.status == 3) {
          this.steps_active = 3
        } else if (res.status == 0 || res.status == 1) {
          this.steps_active = 2
        }else{
          this.steps_active = 3
        }
        this.statusLabel.map(item => {
          if (item.id == res.status) {
            res.status_name = item.value
          }
        })
        // type 根据status传值
        if (res.status == 0) {
          // 确认
          this.type = 'check'
        } else if (res.status == 1) {
          // 领导确认
          this.type = 'leader'
        } else if (res.status == 3 || res.status == 4) {
          // 提交整改
          this.type = 'reform'
        } else {
          this.type = 'show'
        }
        this.type_name = this.typeNameList[this.type]

        if(res.status>1&&(res.status!=6)){
          this.checkstatus = 3
        }else{
          if(res.status==6){
            this.checkstatus = 6
          }else{
            this.checkstatus = ""
          }
        }

        this.showform = res
        res.mission_id?this.getGroups(res.mission_id,res.up_admin_id,res.department_id):''
        this.$forceUpdate()
      },
      submit() {
        let _files = []
        if (this.pictureList.length > 0) {
          for (var h of this.pictureList) {
            if (h.response) {
              _files.push(h.response.id)
            } else {
              _files.push(h.id)
            }
          }
          this.form.fix_file_ids = _files
        } else {
          this.form.fix_file_ids = []
        }
        // return
        // 确认
        console.log("this.form.status",this.form.status)
        if (this.type === 'check') {
          this.form.status = this.checkstatus
          if (this.form.accept_department_ids || this.form.accept_admin_ids) {
            if (!(this.form.accept_department_ids.length > 0 || this.form.accept_admin_ids.length > 0)) {
              Message({
                type: 'warning',
                message: `请选择分发的部门或人员`
              })
              return
            }
          }
        }
        // 需要领导确认 ，status=1
        if (this.type === 'check') {
          if (this.form.check_leader == 1 || this.form.check_main == 1) {
            this.form.status = 1
          }
        }
        // 领导确认
        if (this.type === 'leader') {
          if(this.is_leader&&this.showform.check_leader==1&&this.form.leader_status===null){
            Message({
              type: 'warning',
              message: `请选择确认结果`
            })
            return
          }
          if(this.is_main_leader&&this.showform.check_main==1&&this.form.main_status===null){
            Message({
              type: 'warning',
              message: `请选择确认结果`
            })
            return
          }
          // 领导确认
          if (this.form.check_leader == 1 && this.form.check_main == 1) {
            if (this.form.leader_status == 1 && this.form.main_status == 1) {
              this.form.status = 3
            } else if(this.form.leader_status === 0 || this.form.main_status === 0){
              this.form.status = 6
            }else{
              this.form.status = 1
            }

          } else {
            if (this.form.check_leader == 1) {
              if(this.form.leader_status==1){
                this.form.status = 3
              }else if(this.form.leader_status===0){
                this.form.status = 6
              }

            } else if (this.form.check_main == 1) {
              if(this.form.main_status==1){
                this.form.status = 3
              }else if(this.form.main_status===0){
                this.form.status = 6
              }
            }
          }
        }
        // 部门接收
        // 提交整改
        if (this.type === 'reform') {
          this.form.status = 4
          if (!this.form.fix_end_date) {
            Message({
              type: 'warning',
              message: `请选择整改结束时间`
            })
            return
          }
          if (!this.form.fix_introduce) {
            Message({
              type: 'warning',
              message: `请输入整改说明`
            })
            return
          }
        }


        console.log("form",this.form)
        if (!this.form.status) {
          Message({
            type: 'warning',
            message: `请选择状态`
          })
          return
        }
        // return

        save({
          id: this.id,
          ...this.form
        }).then(res => {
          Message({
            type: 'success',
            message: `更新成功`
          })
          this.isShow = false
          this.$emit('refresh')
        })
      },
    },
    watch: {
      isShow(newVal) {
        if (newVal) {
          this.getDetail()
          // if (this.type === 'check') {

          // }
        } else {
          this.id = ''
          this.pictureList = []
          this.showform = {}
          this.showurl = []
          this.showfixurl = []
          this.is_leader=false
          this.is_main_leader=false
          this.is_guiji=false
          this.is_chuzhang=false
          this.department_id=''
          this.login_id=''
          this.is_myself = false
          this.groupObj = {}
          this.showgroups = false
          this.$refs['dialog'].reset()
        }
      }
    }

  }
</script>
<style scoped>
  /deep/ .el-icon-circle-close {
    color: #fff
  }
</style>
<style scoped lang="scss">
  ::v-deep .status,
  ::v-deep .check_leader,
  ::v-deep .check_main,
  ::v-deep .accept_admin_ids,
  ::v-deep .accept_department_ids,
  ::v-deep .plan_end_date,
  ::v-deep .duty_admin_id,
  ::v-deep .fix_status,
  ::v-deep .fix_end_date,
  ::v-deep .fix_introduce,
  ::v-deep .fix_file_ids,
  ::v-deep .confirm_status,
  ::v-deep .re_check_leader,
  ::v-deep .re_check_main,
  ::v-deep .re_leader_status,
  ::v-deep .re_main_status,
  ::v-deep .plan_end_date_name,
  ::v-deep .duty_admin_name,
  ::v-deep .accept_admin_name{
    flex-basis: 80%;
    display:none
  }
  ::v-deep .el-form{
    >div{
      align-items: flex-start!important;
    }
  }
  ::v-deep .wraps{
    flex-wrap: wrap;
    margin-bottom:-12px;
  }
  ::v-deep .contents{
    flex-basis: 85%;
  }
  ::v-deep .steps{
    flex-basis: 11%;
    margin-top:20px;
  }
  ::v-deep .el-transfer button{
    padding:10px;
  }
  ::v-deep .el-transfer__buttons{
    padding:0 5px;
  }
  ::v-deep .el-transfer-panel{
    width:165px
  }
  ::v-deep .el-steps{
    position: fixed;
  }
  ::v-deep .el-step{
    flex-basis: 17%!important;
  }
  ::v-deep .margin-top {
    padding: 20px;
    font-size: 16px;
  }

  ::v-deep .el-descriptions-item__label:not(.is-bordered-label) {
    line-height: 40px;
    min-width: 120px;

  }
  ::v-deep .el-descriptions-item__label.is-bordered-label{
        width:16%;
  }

  ::v-deep .el-descriptions-item__container .el-descriptions-item__content {
    line-height: 40px;

  }
  ::v-deep .el-descriptions :not(.is-bordered) .el-descriptions-item__cell{
        width:16%;
  }
  ::v-deep .steps {
    padding: 0 20px;
  }

  ::v-deep .el-step__head.is-success {
    color: #338de3;
    border-color: #338de3;
    line-height: 27px;
  }

  ::v-deep .el-step__title.is-success {
    color: #338de3;
  }

  ::v-deep .el-step__head.is-process,
  ::v-deep .el-step__head.is-wait {
    line-height: 27px;
  }

  // .xy-table-item-label {
  //   width: 160px;
  // }

  .img__delete {
    transform: scale(0.8, 0.8);

    position: absolute;
    top: 4px;
    right: 4px;
  }

  ::v-deep .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  ::v-deep .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  ::v-deep .el-upload--picture-card {
    font-size: 28px;
    color: #8c939d;
    width: 146px !important;
    height: 146px !important;
    line-height: 146px !important;
    text-align: center;
  }

  ::v-deep .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 146px !important;
    height: 146px !important;
    line-height: 146px !important;
    text-align: center;
  }

  ::v-deep .avatar {
    width: 80px !important;
    display: block;
    border-radius: 6px;
  }

  // ::v-deep .xy-table-item-label {
  //   width: 160px !important;
  // }

  ::v-deep .el-date-editor .el-range-separator {
    width: auto !important;
  }

  ::v-deep .el-input-number .el-input__inner {
    text-align: left !important;
  }
  ::v-deep .el-divider__text{
    font-size: 20px;
  }
  .searchCompanys {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;

    .el-input {
      width: 80%
    }
  }
</style>
