<template>
  <div class="app-container">
    <div class="header_main">
      {{headTitle}}
      <div class="return_btn" @click="onClickLeft"></div>
    </div>
    <div style="height: 58px;"></div>
    <div class="main_box">
      <van-field v-model="value" label="案件名称" placeholder="请选择案件名称" :border="false" readonly is-link @click="$router.push({name:'lawEnforcementCaseList'})" />
      <van-field v-model="value" label="执法节点" placeholder="请选择执法节点" :border="false" readonly is-link arrow-direction="down" >
        <template #input>
          <van-popover
            v-model="showPopover"
            trigger="click"
            :actions="actions"
            placement="bottom-start"
          >
            <template #reference>
              <p style="color: #cccccc">请选择执法节点</p>
            </template>
          </van-popover>
        </template>
      </van-field>
      <van-field v-model="value" label="签字上传" :border="false" readonly >
        <template #input>
          <van-uploader v-model="fileList" multiple />
        </template>
      </van-field>
    </div>

    <div class="main_box" style="margin-top: 10px;">
      <van-cell>
        <template #title>
          <van-icon name="../../../static/images/lawEnforcement/icon/record_icon_01.png" size="20"></van-icon>
          <span class="custom-title">视频地址<i class="bgBlue"></i></span>
        </template>
      </van-cell>
      <van-field type="textarea" autosize :border="false" placeholder="输入视频地址、执法文件名称等" />
    </div>

    <div class="main_box" style="margin-top: 10px;">
      <van-cell>
        <template #title>
          <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajwd.png" size="20"></van-icon>
          <span class="custom-title">模板<i class="bgBlue"></i></span>
        </template>
      </van-cell>
      <div class="cf">
        <van-row>
          <van-col :span="6">
            <van-image src="../../../../static/images/lawEnforcement/icon/record_icon_02.png" width="50" />
          </van-col>
          <van-col :span="18">
            <p>现场检查（勘验）笔录.docx</p>
          </van-col>
        </van-row>
      </div>
    </div>

    <div class="submit_box">
      <p class="submitButton">保存</p>
      <p class="submitButton">处理</p>
    </div>
  </div>
</template>

<script>
  import { getScheme } from "@/api/lawEnforcement/index";
  export default {
    name: "programmeDetail",
    data() {
      return {
        showPopover: false,
        // 通过 actions 属性来定义菜单选项
        actions: [{ text: '选项一' }, { text: '选项二' }, { text: '选项三' }],
        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),

        activeNames: ['1'],
        activeNames1: ['1'],
        activeNames2: ['1'],

        fileList:[],
        headTitle:''
      };
    },
    created() {
      // this.getDictionaries()
      if (this.$route.query.type == '1'){
        this.headTitle = '现场检查（勘察）笔录';
      }
      if (this.$route.query.type == '2'){
        this.headTitle = '询问笔录';
      }
      if (this.$route.query.type == '3'){
        this.headTitle = '当场行政处罚决定书';
      }
      if (this.$route.query.type == '4'){
        this.headTitle = '责令改正通知书';
      }
    },
    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-collapse-item__content{
    padding: 0;
  }
  .cf{
    padding: 0 3%;
    margin-top: 20PX;
    margin-bottom: 20PX;
    .van-row{
      background: #F0F3F5;
      display: flex;
      align-items: center;
      .van-col{
        padding: 5PX 0;
        font-size: 12PX!important;
        text-align: center;
        p{
          color: #1D6FE9;
          text-align: left;
          font-size: .4rem;
        }
      }
      &:first-child{
        background: transparent;
      }
    }
  }
  .header_main{
    height: 116px;
    background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
    background-size: 100% 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 36px;
    line-height: 116px;
    text-align: center;
    color: #fff;
    z-index: 999;
    .return_btn{
      width: 24px;
      height: 43.2px;
      background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
      background-size: 20px 36px;
      position: absolute;
      left: 38px;
      top: 36px;
    }
    .add_btn{
      width: 56.4px;
      height: 40.8px;
      background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
      background-size: 47px 34px;
      position: absolute;
      right: 38px;
      top: 36px;
    }
  }
  /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: 10PX;
    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: 40%;
    margin: 0 auto;
    background-image: linear-gradient(to right, #77A6EF , #2E79E9);
    text-align: center;
    color: #ffffff;
    height: 70px;
    line-height: 70px;
    border-radius: 8PX;
    margin-top: 25PX;
    &:first-child{
      background-image: linear-gradient(to right, #21CAC3 , #17A8A2);
    }
  }
  .submit_box{
    display: flex;
    align-items: center;
    justify-content: space-around;
  }

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

</style>
