<template>
  <div class="app-container">
    <van-nav-bar
      title="查看方案信息"
      fixed
      placeholder
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="main_box">
      <van-cell>
        <template #title>
          <van-icon name="../../../static/images/lawEnforcement/icon/icon_zxfa.png" size="20"></van-icon>
          <span class="custom-title">方案信息<i class="bgBlue"></i></span>
        </template>
      </van-cell>
      <van-cell title="是否公开" :value="form.isOpen == 'N' ? '否' : '是' " />
      <van-cell title="方案名称" :label="form.schemeName" />
      <van-cell title="检查开始日期" :value="form.checkStartDate" />
      <van-cell title="检查结束日期" :value="form.checkEndDate" />
      <van-cell title="检查方式" :value="form.checkMethod" />
      <van-cell title="检查部门" :value="form.checkDepartment" />
      <van-cell title="检查事项" :label="form.checkList" />
      <van-cell title="检查类型" :value="form.checkType" />
      <van-cell title="检察方案描述" :label="form.checkContent" />
    </div>

    <div class="main_box" style="margin-top: 10px;">
      <van-cell>
        <template #title>
          <van-icon name="../../../static/images/lawEnforcement/icon/icon_zxry.png" size="20"></van-icon>
          <span class="custom-title">执行人员<i class="bgBlue"></i></span>
        </template>
      </van-cell>
      <div class="peopleList">
        <van-row>
          <van-col :span="4">序号</van-col>
          <van-col :span="10">执行人员</van-col>
          <van-col :span="10">执法证号</van-col>
        </van-row>

        <van-row v-for="(item,index) in form.tEnforceSchemeHandlerList" :key="index" >
          <van-col :span="4">{{index+1}}</van-col>
          <van-col :span="10">{{item.name}}</van-col>
          <van-col :span="10">{{item.enforceNum}}</van-col>
        </van-row>

      </div>
    </div>
  </div>
</template>

<script>
  import { getScheme } from "@/api/lawEnforcement/index";
  export default {
    name: "programmeDetail",
    data() {
      return {
        showBankType:false,
        showPayeeType:false,
        showPicker:false,
        form:{},

        bankType:'',
        payeeType:'',
        value:'',

        bankTypeOptions:[],
        payeeTypeOptions:[],
        tEnforceSchemeHandlerList:[],
        minDate: new Date(2020, 0, 1),
        maxDate: new Date(2025, 10, 1),
        currentDate: new Date(2021, 0, 17),
      };
    },
    created() {
      this.getDictionaries()
    },
    methods: {
      getDictionaries(){
        getScheme(this.$route.query.id).then((response) => {
          this.form = response.data;
        });
      },
      goBack(){
        window.history.go(-1)
      }
    },
  }
</script>

<style scoped lang="scss">
  .app-container {
    padding: 2% 0;
  }
  /deep/ .van-radio--horizontal{
    margin-left: 0.32rem;
    margin-right: 0;
  }
  .peopleList{
    padding-right: 3%;
    .van-row{
      margin-bottom: 10PX;
      .van-col{
        text-align: center;
        font-size: 14PX;
      }
      &:first-child{
        .van-col{
          color: #1D6FE9;
        }
      }
    }
  }
  .main_title{
    font-size: 0.4rem;
    color: #1D6FE9;
    margin: 0.2rem 6%;
    margin-top: 0;
    position: relative;
  }
  .main_box{
    width: 96%;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
    overflow: hidden;
    background-color: #FFF;
    .van-icon{
      vertical-align: middle;
    }
    .custom-title{
      font-size: 17PX;
      color: #333333;
      vertical-align: middle;
      line-height: 1;
      position: relative;
    }
    .tap{
      color: #1D6FE9;
    }
    .bgBlue{
      display: block;
      position: absolute;
      width: 17PX;
      height: 17PX;
      border-radius: 50%;
      background-color: rgba(29,111,233,0.26);
      top: -2PX;
      right: -8PX;
    }
  }
  .submitButton{
    width: 80%;
    margin: 0 auto;
    background-color: #1D6FE9;
  }

  .addFamily{
    position: absolute;
    top: -2px;
    right: 0;
    border-radius: 50%;
  }
</style>
