<template>
  <div class="app-container">
    <div class="header_main">
      案件处理
      <div class="return_btn" @click="onClickLeft"></div>
    </div>
    <div style="height: 58px;"></div>
    <van-tabs type="card" :duration="0.2" animated background="transparent" style="border: none;" v-model="caseProgress">
      <!--      登记-->
      <van-tab :disabled="0 <= caseActive ? false : true">
        <template #title>
          <div :class="{ finish: 1 <= caseActive , notStarted: 1 > caseActive , ongoing: 0 == caseActive }" >
            <p>登记</p>
            <p>
              <van-icon name="success" v-if="1 <= caseActive"/>
              <van-icon name="circle" v-if="caseActive == 0"/>
            </p>
          </div>
        </template>
        <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="案件来源" :border="false" v-model="form.caseSource" />
          <van-cell title="关联方案" :border="false" v-model="form.schemeId" />
          <van-cell title="案件属地" :border="false" v-model="form.deptId" />
          <van-cell title="执行主体" :border="false" v-model="form.belongTeam" />
          <van-cell title="案件名称" :border="false" v-model="form.caseName" />
          <van-cell title="登记日期" :border="false" v-model="form.registerDate" />
          <van-cell title="执法类别" :border="false" v-model="form.enforceCategory" />
          <!--<van-cell title="案件简述1" :border="false" v-model="form.caseSource" />-->
        </div>

        <div class="main_box" style="margin-top: 10px;">
          <van-collapse v-model="activeNames">
            <van-collapse-item name="1">
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_dsr.png" size="20"></van-icon>
                <span class="custom-title">当事人<i class="bgBlue"></i></span>
              </template>
              <van-cell title="当事人类型" :border="false" v-model="form.type" />
              <template v-if="form.type=='个人/个体工商户'">
                <van-cell title="当事人姓名" :border="false" v-model="form.name" />
                <van-cell title="性别" :border="false" v-model="form.sex" />
                <van-cell title="身份证号" :border="false" v-model="form.cardNum" />
                <van-cell title="出生日期" :border="false" v-model="form.birthday" />
                <van-cell title="民族" :border="false" v-model="form.nation" />
                <van-cell title="工作单位及职务" :border="false" v-model="form.companyPosition" />
                <van-cell title="字号名称" :border="false" v-model="form.zihao" />
              </template>
              <template v-if="form.type=='企业'">
                <van-cell title="企业名称" :border="false" v-model="form.companyName" />
                <van-cell title="法人/负责人" :border="false" v-model="form.legalName" />
              </template>
              <van-cell title="联系电话" :border="false" v-model="form.phone" />
              <van-cell title="联系地址" :border="false" v-model="form.address" />
              <van-cell title="统一社会信用代码" :border="false" v-model="form.uniformCode" />
            </van-collapse-item>
          </van-collapse>
        </div>

        <div class="main_box" style="margin-top: 10px;">
          <van-collapse v-model="activeNames1">
            <van-collapse-item name="1">
              <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-uploader v-model="form.attachementList" :show-upload="false" :deletable="false"/>
            </van-collapse-item>
          </van-collapse>
        </div>

        <div class="main_box" style="margin-top: 10px;">
          <van-collapse v-model="activeNames2">
            <van-collapse-item name="1">
              <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>
              <div class="peopleList">
                <van-row>
                  <van-col :span="4">序号</van-col>
                  <van-col :span="6">执行人员</van-col>
                  <van-col :span="10">执法证号</van-col>
                  <van-col :span="4">带队人</van-col>
                </van-row>

                <van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" >
                  <van-col :span="4">{{index+1}}</van-col>
                  <van-col :span="6">{{item.enforcerName}}</van-col>
                  <van-col :span="10">{{item.enforcerNum}}</van-col>
                  <van-col :span="4">
                    <div class="icon_box">
                      <van-checkbox v-model="item.enforcerLeader" shape="square"></van-checkbox>
                    </div>
                  </van-col>
                </van-row>
                <!--            <img src="../../../../static/images/lawEnforcement/new/addPeop_btn.png" style="margin: 0 auto;" @click="$router.push({name:'lawEnforcementCaseLawEnforcer'})">-->
              </div>
            </van-collapse-item>
          </van-collapse>
        </div>
      </van-tab>
      <!--      勘察-->
      <van-tab v-show="progressLength>=3" v-if="zhenchaShow" :disabled="1 <= caseActive ? false : true">
        <template #title>
          <div
            :class="{ finish: 2 <= caseActive , notStarted: 2 > caseActive , ongoing: 1 == caseActive }"
          >
            <p>勘察</p>
            <p>
              <van-icon name="success" v-if="2 <= caseActive"/>
              <van-icon name="circle" v-if="caseActive == 1"/>
            </p>
          </div>
        </template>
        <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="案件来源" :border="false" v-model="form.caseSource" />
          <van-cell title="关联方案" :border="false" v-model="form.schemeId" />
          <van-cell title="案件属地" :border="false" v-model="form.deptId" />
          <van-cell title="案件编号" :value="surveyForm.instanceId==''?'':form.caseNumPart1 + '农' + form.caseNumPart2 + '[' + form.caseNumPart3 + ']' +form.caseNum + '号'"/>
        </div>

        <div class="main_box" style="margin-top: 10px;">
          <van-collapse v-model="activeNames2">
            <van-collapse-item name="1">
              <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>
              <div class="peopleList">
                <van-row>
                  <van-col :span="6">执行人员</van-col>
                  <van-col :span="10">执法证号</van-col>
                  <van-col :span="4">签到次数</van-col>
                  <van-col :span="4">带队人</van-col>
                </van-row>

                <van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" >
                  <van-col :span="6">{{item.enforcerName}}</van-col>
                  <van-col :span="10">{{item.enforcerNum}}</van-col>
                  <van-col :span="4">{{item.num}}</van-col>
                  <van-col :span="4">
                    <div class="icon_box">
                      <van-checkbox v-model="item.enforcerLeader" shape="square"></van-checkbox>
                      <van-icon v-if="caseActive == 1" name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index,'CaseHand')"></van-icon>
                    </div>
                  </van-col>
                </van-row>
                <img v-if="caseActive == 1" src="../../../../static/images/lawEnforcement/new/addPeop_btn.png" style="margin: 0 auto;" @click="enforceType = 'CaseHand',$router.push({name:'lawEnforcementCaseLawEnforcer'})">
              </div>
            </van-collapse-item>
          </van-collapse>
        </div>

        <van-form :readonly="caseProgress != 1 || (surveyForm.instanceId!='' && surveyForm.instanceId!=null && surveyForm.instanceId!=undefined)">

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_xckc.png" size="20"></van-icon>
                <span class="custom-title">现场检查<i class="bgBlue"></i></span>
              </template>
            </van-cell>

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择勘察开始时间'}]"
              v-model="surveyForm.surveyStartTime"
              label="勘察开始时间"
              placeholder="请选择勘察开始时间"
              @click="showSurveyStartTime = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择勘察结束时间'}]"
              v-model="surveyForm.surveyEndTime"
              label="勘察结束时间"
              placeholder="请选择勘察结束时间"
              @click="showSurveyEndTime = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field input-align="right" label-width="auto" label="当事人" placeholder="当事人" v-model="surveyForm.dangshiren" />
            <van-field input-align="right" label-width="auto" label="记录人" placeholder="记录人" v-model="surveyForm.recorder" />
            <van-field input-align="right" label-width="auto" label="检查（勘察）地点" placeholder="检查（勘察）地点" v-model="surveyForm.surveyAddr" />

            <van-field readonly input-align="right" label-width="auto" label="现场检查（勘察）情况"/>
            <van-field v-model="surveyForm.surveyDescription" rows="2" autosize type="textarea" placeholder="现场检查（勘察）情况" />

          </div>

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>
                <span class="custom-title">询问信息<i class="bgBlue"></i></span>
              </template>
            </van-cell>
            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择询问开始时间'  }]"
              v-model="surveyForm.askStartTime"
              label="询问开始时间"
              placeholder="请选择询问开始时间"
              @click="showAskStartTime = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />
            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择询问结束时间'}]"
              v-model="surveyForm.askEndTime"
              label="询问结束时间"
              placeholder="请选择询问结束时间"
              @click="showAskEndTime = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />
            <van-field input-align="right" label-width="auto" label="询问地点" placeholder="询问地点" v-model="surveyForm.askAddr"/>
            <van-field input-align="right" label-width="auto" label="询问记录人" placeholder="询问记录人" v-model="surveyForm.askRecorder"/>
            <van-field input-align="right" label-width="auto" label="被询问人姓名" placeholder="被询问人姓名" v-model="surveyForm.askedName"/>
            <van-field input-align="right" label-width="auto" label="被询问人电话" placeholder="被询问人电话" v-model="surveyForm.askedPhone"/>
            <van-field input-align="right" label-width="auto" label="身份证号" placeholder="身份证号" v-model="surveyForm.idCard"/>
            <van-field input-align="right" label-width="auto" label="性别" placeholder="性别" v-model="surveyForm.gender">
              <template #input>
                <van-radio-group v-model="surveyForm.gender" direction="horizontal">
                  <van-radio name="1">男</van-radio>
                  <van-radio name="2">女</van-radio>
                </van-radio-group>
              </template>
            </van-field>
            <van-field input-align="right" label-width="auto" label="工作单位" placeholder="工作单位" v-model="surveyForm.workCompany" />
            <van-field input-align="right" label-width="auto" label="职务" placeholder="职务" v-model="surveyForm.workPosition" />
            <van-field input-align="right" label-width="auto" label="住址" placeholder="住址" v-model="surveyForm.address" />
            <van-field input-align="right" label-width="auto" label="询问问题" placeholder="询问问题" v-model="surveyForm.question" />
            <van-field input-align="right" label-width="auto" label="被询问人员证件是否清楚" placeholder="被询问人员证件是否清楚" v-model="surveyForm.isClear == 'Y' ? '是' : '否'" >
              <template #input>
                <van-radio-group v-model="surveyForm.isClear" direction="horizontal">
                  <van-radio name="Y">是</van-radio>
                  <van-radio name="N">否</van-radio>
                </van-radio-group>
              </template>
            </van-field>
            <van-field input-align="right" label-width="auto" label="是否申请调查人员回避" placeholder="是否申请调查人员回避" v-model="surveyForm.isAvoid == 'Y' ? '是' : '否'">
              <template #input>
                <van-radio-group v-model="surveyForm.isAvoid" direction="horizontal">
                  <van-radio name="Y">是</van-radio>
                  <van-radio name="N">否</van-radio>
                </van-radio-group>
              </template>
            </van-field>
            <van-field input-align="right" label-width="auto" label="被询问人回答内容" placeholder="被询问人回答内容" v-model="surveyForm.answer" />
          </div>

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_xccj.png" size="20"></van-icon>
                <span class="custom-title">现场抽检选项<i class="bgBlue"></i></span>
              </template>
            </van-cell>
            <van-field input-align="right" label-width="auto" label="是否现场抽检" placeholder="是否现场抽检" v-model="surveyForm.isSpotCheck == 'Y' ? '是' : '否'">
              <template #input>
                <van-radio-group v-model="surveyForm.isSpotCheck" direction="horizontal">
                  <van-radio name="Y">是</van-radio>
                  <van-radio name="N">否</van-radio>
                </van-radio-group>
              </template>
            </van-field>
          </div>

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajxx.png" size="20"></van-icon>
                <span class="custom-title">案件信息<i class="bgBlue"></i></span>
              </template>
            </van-cell>

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择受理时间'}]"
              v-model="surveyForm.handleDate"
              label="受理时间"
              placeholder="请选择受理时间"
              @click="showHandleDate = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择受案时间'}]"
              v-model="surveyForm.shouanDate"
              label="受案时间"
              placeholder="请选择受案时间"
              @click="showShouanDate = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field readonly input-align="right" label-width="auto" label="简要案情及立案（不予立案）理由"/>
            <van-field v-model="surveyForm.reason" rows="2" autosize type="textarea" placeholder="简要案情及立案（不予立案）理由" />
            <van-field input-align="right" label-width="auto" label="是否审批" v-model="surveyForm.isApprove == 'Y' ? '是' : '否'">
              <template #input>
                <van-radio-group v-model="surveyForm.isApprove" direction="horizontal">
                  <van-radio name="Y">是</van-radio>
                  <van-radio name="N">否</van-radio>
                </van-radio-group>
              </template>
            </van-field>

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择审批程序设置'}]"
              v-model="surveyResult"
              label="审批程序设置"
              placeholder="请选择审批程序设置"
              @click="showSurveyResult = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field v-if="surveyForm.instanceId=='' && caseProgress == 1 && surveyForm.surveyResult!=1" readonly input-align="right" label-width="auto" label="案件编号" placeholder="案件编号" v-model="surveyForm.caseNumPart1 + '农(' + surveyForm.caseNumPart2 + ')' + surveyForm.caseNumPartType + '[' + surveyForm.caseNumPart3 + ']' +surveyForm.caseNum + '号'" />

          </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>
            <van-uploader v-model="surveyOption" :after-read="afterRead" @delete="deleteFile" :show-upload="caseProgress == 1 && ( surveyForm.instanceId=='' || surveyForm.instanceId==null || surveyForm.instanceId==undefined )" :deletable="caseProgress == 1 && ( surveyForm.instanceId=='' || surveyForm.instanceId==null || surveyForm.instanceId==undefined )" />
          </div>
        </van-form>

        <div class="submit_box" v-if="caseProgress == 1 && ( surveyForm.instanceId=='' || surveyForm.instanceId==null || surveyForm.instanceId==undefined )">
          <p class="submitButton" @click="preservation">保存</p>
          <p class="submitButton" @click="submit">提交</p>
        </div>
      </van-tab>
      <!--      立案-->
      <van-tab v-show="progressLength>=4" v-if="lianShow" :disabled="2 <= caseActive ? false : true">
        <template #title>
          <div
            :class="{ finish: 3 <= caseActive , notStarted: 3 > caseActive , ongoing: 2 == caseActive }"
          >
            <p>立案</p>
            <p>
              <van-icon name="success" v-if="3 <= caseActive"/>
              <van-icon name="circle" v-if="caseActive == 2"/>
            </p>
          </div>
        </template>
        <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="案件来源" :border="false" v-model="form.caseSource" />
          <van-cell title="关联方案" :border="false" v-model="form.schemeId" />
          <van-cell title="案件属地" :border="false" v-model="form.deptId" />
        </div>

        <div class="main_box" style="margin-top: 10px;">
          <van-collapse v-model="activeNames2">
            <van-collapse-item name="1">
              <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>
              <div class="peopleList">
                <van-row>
                  <van-col :span="6">执行人员</van-col>
                  <van-col :span="10">执法证号</van-col>
                  <van-col :span="4">签到次数</van-col>
                  <van-col :span="4">带队人</van-col>
                </van-row>
                <van-row v-for="(item,index) in tEnforcePutRecordHandlerList" :key="index" >
                  <van-col :span="6">{{item.enforcerName}}</van-col>
                  <van-col :span="10">{{item.enforcerNum}}</van-col>
                  <van-col :span="4">{{item.num}}</van-col>
                  <van-col :span="4">
                    <div class="icon_box">
                      <van-checkbox v-model="item.enforcerLeader" shape="square"></van-checkbox>
                      <van-icon v-if="caseActive == 2" name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index,'PutRecord')"></van-icon>
                    </div>
                  </van-col>
                </van-row>
<!--                @click="$router.push({name:'lawEnforcementCaseLawEnforcer'})" v-if="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )"-->
                <img v-if="caseActive == 2" src="../../../../static/images/lawEnforcement/new/addPeop_btn.png" style="margin: 0 auto;" @click="enforceType = 'PutRecord',$router.push({name:'lawEnforcementCaseLawEnforcer'})">
              </div>
            </van-collapse-item>
          </van-collapse>
        </div>

        <van-form :readonly="caseProgress != 2 || (putRecordForm.instanceId!='' && putRecordForm.instanceId!=null && putRecordForm.instanceId!=undefined)">

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_cfky.png" size="20"></van-icon>
                <span class="custom-title">查封扣押<i class="bgBlue"></i></span>
              </template>
            </van-cell>

            <van-field readonly input-align="right" label-width="auto" label="涉嫌违法行为"/>
            <van-field v-model="putRecordForm.illegalAct" rows="2" autosize type="textarea" placeholder="涉嫌违法行为" />

            <van-field readonly input-align="right" label-width="auto" label="处罚依据及内容"/>
            <van-field v-model="putRecordForm.punishContent" rows="2" autosize type="textarea" placeholder="处罚依据及内容" />

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择查封日期'}]"
              v-model="putRecordForm.sealDate"
              label="查封日期"
              placeholder="请选择查封日期"
              @click="showSealDate = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择查封时效'}]"
              v-model="putRecordForm.sealTimeliness"
              label="查封时效"
              placeholder="请选择查封时效"
              @click="showSealTimeliness = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field input-align="right" label-width="auto" label="查封天数" placeholder="查封天数" v-model="putRecordForm.sealDays" />
            <van-field input-align="right" label-width="auto" label="产品保存地点" v-model="putRecordForm.savePlace">
              <template #input>
                <van-radio-group v-model="putRecordForm.savePlace" direction="horizontal">
                  <van-radio name="1">本地</van-radio>
                  <van-radio name="2">异地</van-radio>
                </van-radio-group>
              </template>
            </van-field>

            <van-field v-if="putRecordForm.savePlace==2" v-model="putRecordForm.savePlaceAddress" rows="2" autosize type="textarea" placeholder="请输入异地具体保存地址" />

            <van-field readonly input-align="right" label-width="auto" label="现场情况"/>
            <van-field v-model="putRecordForm.sceneCondition" rows="2" autosize type="textarea" placeholder="现场情况" />

            <van-field input-align="right" label-width="auto" label="上诉单位" placeholder="上诉单位" v-model="putRecordForm.appealUnit" />
            <van-field input-align="right" label-width="auto" label="复议单位" placeholder="复议单位" v-model="putRecordForm.administrativeDept" />
            <van-field input-align="right" label-width="auto" label="诉讼单位" placeholder="诉讼单位" v-model="putRecordForm.lawsuitDept" />
            <div class="peopleList cf">
              <van-row>
                <van-col :span="5">财物名称</van-col>
                <van-col :span="3">规格</van-col>
                <van-col :span="3">数量</van-col>
                <van-col :span="6">生产日期(批号)</van-col>
                <van-col :span="7">生产经营单位</van-col>
              </van-row>

              <van-row v-for="(item,index) in tEnforceDetainHandlerList" :key="index">
                <van-col :span="5"><van-field input-align="center" placeholder="财物名称" v-model="item.name" /></van-col>
                <van-col :span="3"><van-field input-align="center" placeholder="规格" v-model="item.size" /></van-col>
                <van-col :span="3"><van-field input-align="center" placeholder="数量" v-model="item.propertyNum" /></van-col>
                <van-col :span="6"><van-field input-align="center" placeholder="生产日期(批号)" v-model="item.productTimeNum" /></van-col>
                <van-col :span="7"><van-field input-align="center" placeholder="生产经营单位" v-model="item.productUnit" /></van-col>
              </van-row>
              <img src="../../../../static/images/lawEnforcement/new/addFinance_btn.png" style="margin: 0 auto;" @click="addFinance" v-if="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )">
            </div>

<!--            <div class="cf">-->
<!--              <van-row>-->
<!--                <van-col :span="6">-->
<!--                  <van-image src="../../../../static/images/lawEnforcement/icon/icon_fj.png" width="50" />-->
<!--                  <p>证据先行</p>-->
<!--                  <p>保存通知书</p>-->
<!--                </van-col>-->
<!--                <van-col :span="6">-->
<!--                  <van-image src="../../../../static/images/lawEnforcement/icon/icon_fj.png" width="50" />-->
<!--                  <p>查封扣押</p>-->
<!--                  <p>现场笔录</p>-->
<!--                </van-col>-->
<!--                <van-col :span="6">-->
<!--                  <van-image src="../../../../static/images/lawEnforcement/icon/icon_fj.png" width="50" />-->
<!--                  <p>查封扣押</p>-->
<!--                  <p>决定书</p>-->
<!--                </van-col>-->
<!--                <van-col :span="6"></van-col>-->
<!--              </van-row>-->
<!--            </div>-->
          </div>

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_cfky.png" size="20"></van-icon>
                <span class="custom-title">抽样信息<i class="bgBlue"></i></span>
              </template>
            </van-cell>

            <van-field input-align="right" label-width="auto" label="抽样现场人员" v-model="samplingForm.samplingScene">
              <template #input>
                <van-radio-group v-model="samplingForm.samplingScene" direction="horizontal">
                  <van-radio name="1">当事人</van-radio>
                  <van-radio name="2">有关人员</van-radio>
                </van-radio-group>
              </template>
            </van-field>

            <van-field
              readonly
              clickable
              required
              :rules="[{ required: true , message:'请选择抽样时间'}]"
              v-model="samplingForm.samplingTime"
              label="抽样时间"
              placeholder="请选择抽样时间"
              @click="showSamplingTime = true"
              input-align="right"
              right-icon="arrow-down"
              label-width="auto"
            />

            <van-field input-align="right" label-width="auto" label="抽样地点" placeholder="抽样地点" v-model="samplingForm.samplingPlace" />
            <van-field input-align="right" label-width="auto" label="联系人" placeholder="联系人" v-model="samplingForm.linkman" />
            <van-field input-align="right" label-width="auto" label="联系电话" placeholder="联系电话" v-model="samplingForm.linkPhone" />

            <div v-for="(item,index) in tEnforceSamplingGoodsList" :key="index">
              <van-divider>物品信息{{index+1}}</van-divider>
              <van-field input-align="right" label-width="auto" label="物品名称" placeholder="物品名称" v-model="item.goodsName" />
              <van-field input-align="right" label-width="auto" label="商标" placeholder="商标" v-model="item.goodsIcon" />
              <van-field input-align="right" label-width="auto" label="生产单位" placeholder="生产单位" v-model="item.productUnit" />

              <van-field
                readonly
                clickable
                required
                :rules="[{ required: true , message:'请选择厂家确认期限'}]"
                v-model="item.timeliness"
                label="厂家确认期限"
                placeholder="请选择厂家确认期限"
                @click="showTimeliness = true,goodsIndex = index"
                input-align="right"
                right-icon="arrow-down"
                label-width="auto"
              />

              <van-field input-align="right" label-width="auto" label="产品许可证" placeholder="产品许可证" v-model="item.productLicenseNum" />
              <van-field input-align="right" label-width="auto" label="单位许可证" placeholder="单位许可证" v-model="item.unitLicenseNum" />

              <van-field
                readonly
                clickable
                required
                :rules="[{ required: true , message:'请选择生产日期'}]"
                v-model="item.productTimeNum"
                label="生产日期"
                placeholder="请选择生产日期"
                @click="showProductTimeNum = true,goodsIndex = index"
                input-align="right"
                right-icon="arrow-down"
                label-width="auto"
              />

              <van-field input-align="right" label-width="auto" label="样品规格" placeholder="样品规格" v-model="item.specs" />
              <van-field input-align="right" label-width="auto" label="样品基数" placeholder="样品基数" v-model="item.basenum" />
              <van-field input-align="right" label-width="auto" label="抽样数量" placeholder="抽样数量" v-model="item.samplingNum" />

              <van-field
                readonly
                clickable
                required
                :rules="[{ required: true , message:'请选择产品确认期限'}]"
                v-model="item.confirmTimeliness"
                label="产品确认期限"
                placeholder="请选择产品确认期限"
                @click="showConfirmTimeliness = true,goodsIndex = index"
                input-align="right"
                right-icon="arrow-down"
                label-width="auto"
              />

  <!--            :show-upload="false" :deletable="false"-->
              <van-cell title="抽样产品附件" />
              <van-uploader v-model="item.attachementList" :after-read="afterReadAttachement(index)" :before-delete="deleteFileAttachement(index)" :show-upload="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )" :deletable="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )" />
  <!--            :show-upload="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )" :deletable="caseProgress == 1 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )"-->
            </div>
            <div style="text-align: center;margin-bottom: 10px;">
              <img src="../../../../static/images/lawEnforcement/new/addGoods_btn.png" style="margin: 0 auto;" @click="addGoods" v-if="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )">
            </div>
          </div>

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajxx.png" size="20"></van-icon>
                <span class="custom-title">案件信息<i class="bgBlue"></i></span>
              </template>
            </van-cell>
            <van-cell title="立案程序" value="一般程序"  />
            <van-field input-align="right" label-width="auto" label="案件进展" placeholder="案件进展" v-model="putRecordForm.progressCase" />
          </div>

          <div class="main_box" style="margin-top: 10px;margin-bottom: 20PX;">
            <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>
            <van-uploader v-model="samplingOption" :after-read="afterReadSampling" :before-delete="deleteFileSampling" :show-upload="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )" :deletable="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )" />
          </div>

        </van-form>

        <div class="submit_box" v-if="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )">
          <p class="submitButton" @click="submitPutRecordForm">保存</p>
          <p class="submitButton" @click="submitDefine">提交</p>
        </div>
      </van-tab>
      <!--      取证-->
      <van-tab v-show="progressLength>=5" v-if="quzhengShow" :disabled="3 <= caseActive ? false : true">
        <template #title>
          <div
            :class="{ finish: 4 <= caseActive , notStarted: 4 > caseActive , ongoing: 3 == caseActive }"
          >
            <p>取证</p>
            <p>
              <van-icon name="success" v-if="4 <= caseActive"/>
              <van-icon name="circle" v-if="caseActive == 3"/>
            </p>
          </div>
        </template>
        <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="案件名称" v-model="form.caseName"/>
          <van-cell title="关联方案" v-model="form.schemeId"/>
        </div>
        <div class="main_box" style="margin-top: 10px;">
          <van-collapse v-model="activeNames2">
            <van-collapse-item name="1">
              <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>
              <div class="peopleList">
                <van-row>
                  <van-col :span="6">执行人员</van-col>
                  <van-col :span="10">执法证号</van-col>
                  <van-col :span="4">签到次数</van-col>
                  <van-col :span="4">带队人</van-col>
                </van-row>

                <van-row v-for="(item,index) in tEnforceEvidenceHandlerList" :key="index" >
                  <van-col :span="6">{{item.enforcerName}}</van-col>
                  <van-col :span="10">{{item.enforcerNum}}</van-col>
                  <van-col :span="4">{{item.num}}</van-col>
                  <van-col :span="4">
                    <div class="icon_box">
                      <van-checkbox v-model="item.enforcerLeader" shape="square"></van-checkbox>
                      <van-icon v-if="caseActive == 3" name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index,'evidence')"></van-icon>
                    </div>
                  </van-col>
                </van-row>
                <!--                @click="$router.push({name:'lawEnforcementCaseLawEnforcer'})" v-if="caseProgress == 2 && ( putRecordForm.instanceId=='' || putRecordForm.instanceId==null || putRecordForm.instanceId==undefined )"-->
                <img v-if="caseActive == 3" src="../../../../static/images/lawEnforcement/new/addPeop_btn.png" style="margin: 0 auto;" @click="enforceType = 'evidence',$router.push({name:'lawEnforcementCaseLawEnforcer'})">
              </div>
            </van-collapse-item>
          </van-collapse>
        </div>
        <van-form :readonly="caseProgress != 3 || (evidenceForm.instanceId!='' && evidenceForm.instanceId!=null && evidenceForm.instanceId!=undefined)">
          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>
                <span class="custom-title">检测结果<i class="bgBlue"></i></span>
              </template>
            </van-cell>
            <div v-for="(item,index) in detectResults" :key="index">

              <van-field input-align="right" label-width="auto" label="产品名称" placeholder="产品名称" v-model="item.goodsName" />
              <van-field input-align="right" label-width="auto" label="检测报告编号" placeholder="检测报告编号" v-model="item.reportNum" />
              <van-field input-align="right" label-width="auto" label="质量判定" placeholder="质量判定" v-model="item.qualityStatus">
                <template #input>
                  <van-radio-group v-model="item.qualityStatus" direction="horizontal">
                    <van-radio name="1">合格</van-radio>
                    <van-radio name="2">不合格</van-radio>
                  </van-radio-group>
                </template>
              </van-field>
              <van-cell title="检测结果附件"/>
              <van-uploader v-model="item.attachementList" :after-read="afterReadEvidence(index)" :before-delete="deleteFileEvidence(index)" :show-upload="caseProgress == 3 && ( evidenceForm.instanceId=='' || evidenceForm.instanceId==null || evidenceForm.instanceId==undefined )" :deletable="caseProgress == 3 && ( evidenceForm.instanceId=='' || evidenceForm.instanceId==null || evidenceForm.instanceId==undefined )" />
  <!--            :show-upload="false" :deletable="false"-->
              <van-empty v-if="item.attachementList == null && caseProgress == 3 && evidenceForm.instanceId!='' && evidenceForm.instanceId!=null && evidenceForm.instanceId!=undefined " description="暂无文件" />

            </div>
<!--            <div style="text-align: center;">-->
<!--              <img src="../../../../static/images/lawEnforcement/new/addDetect_btn.png" style="margin: 0 auto;" @click="addDetectResults">-->
<!--            </div>-->
            <van-field input-align="right" label-width="auto" label="检测结果" placeholder="检测结果" v-model="evidenceForm.detectionResult"/>
            <van-field input-align="right" label-width="auto" label="申请复检单位" placeholder="申请复检单位" v-model="evidenceForm.reviewUnit"/>
            <van-field input-align="right" label-width="auto" label="复检时效" placeholder="复检时效" v-model="evidenceForm.reviewTime"/>
            <van-field input-align="right" label-width="auto" label="联系人" placeholder="联系人" v-model="evidenceForm.linkman"/>
            <van-field input-align="right" label-width="auto" label="联系电话" placeholder="联系电话" v-model="evidenceForm.linkPhone"/>

          </div>

          <div class="main_box">
            <van-cell>
              <template #title>
                <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajxx.png" size="20"></van-icon>
                <span class="custom-title">案件信息<i class="bgBlue"></i></span>
              </template>
            </van-cell>
            <van-field input-align="right" label-width="auto" label="案件调查过程" placeholder="案件调查过程" v-model="evidenceForm.investigationProcess"/>
            <van-field input-align="right" label-width="auto" label="涉嫌违法事实" placeholder="涉嫌违法事实" v-model="evidenceForm.allegedIllegal"/>
            <van-field input-align="right" label-width="auto" label="违反条例" placeholder="违反条例" v-model="evidenceForm.violationRegulations"/>
            <van-field input-align="right" label-width="auto" label="处罚依据" placeholder="处罚依据" v-model="evidenceForm.punishmentBase"/>
            <van-field input-align="right" label-width="auto" label="证据材料" placeholder="证据材料" v-model="evidenceForm.caseDocuments"/>
            <van-field input-align="right" label-width="auto" label="调查结论" placeholder="调查结论" v-model="evidenceForm.conclusion"/>
            <van-field input-align="right" label-width="auto" label="处罚决定" placeholder="处罚决定" v-model="evidenceForm.penaltyDecision"/>

          </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>
            <van-uploader v-model="evidenceForm.attachementList" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" :show-upload="caseProgress == 3 && ( evidenceForm.instanceId=='' || evidenceForm.instanceId==null || evidenceForm.instanceId==undefined )" :deletable="caseProgress == 3 && ( evidenceForm.instanceId=='' || evidenceForm.instanceId==null || evidenceForm.instanceId==undefined )" />
            <van-empty v-if="evidenceForm.attachement == null && caseProgress == 3 && evidenceForm.instanceId!='' && evidenceForm.instanceId!=null && evidenceForm.instanceId!=undefined" description="暂无文件" />
          </div>
        </van-form>
        <div class="submit_box" v-if="caseProgress == 3 && ( evidenceForm.instanceId=='' || evidenceForm.instanceId==null || evidenceForm.instanceId==undefined )">
          <p class="submitButton" @click="submitEvidenceForm">保存</p>
          <p class="submitButton" @click="submitDefineEvidenceForm">提交</p>
        </div>
      </van-tab>
      <template>
<!--      &lt;!&ndash;      处理&ndash;&gt;-->
<!--      <van-tab v-show="progressLength>=6" v-if="chuliShow" :disabled="4 <= caseActive ? false : true">-->
<!--        <template #title>-->
<!--          <div-->
<!--            :class="{ finish: 5 <= caseActive , notStarted: 5 > caseActive , ongoing: 4 == caseActive }"-->
<!--          >-->
<!--            <p>处理</p>-->
<!--            <p>-->
<!--              <van-icon name="success" v-if="5 <= caseActive"/>-->
<!--              <van-icon name="circle" v-if="caseActive == 4"/>-->
<!--            </p>-->
<!--          </div>-->
<!--        </template>-->
<!--        <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="案件名称" v-model="treatForm.caseName"/>-->
<!--          <van-cell title="关联方案" v-model="treatForm.schemeId"/>-->
<!--        </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 tEnforceTreatHandlerList" :key="index">-->
<!--              <van-col :span="4">{{index+1}}</van-col>-->
<!--              <van-col :span="10">{{item.enforcerName}}</van-col>-->
<!--              <van-col :span="10">{{item.enforcerNum}}</van-col>-->
<!--            </van-row>-->

<!--          </div>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">听证<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="是否听证" v-model="treatForm.isHearing == 'Y' ? '是':'否'" />-->
<!--          <div v-if="treatForm.isHearing=='Y'">-->
<!--            <van-cell title="听证开始时间" v-model="treatForm.hearingStartTime" />-->
<!--            <van-cell title="听证结束时间" v-model="treatForm.hearingEndTime" />-->
<!--            <van-cell title="听证地点" v-model="treatForm.place"/>-->
<!--            <van-cell title="申请人" v-model="treatForm.proposer"/>-->
<!--            <van-cell title="法人代表(负责人)" v-model="treatForm.director" />-->
<!--            <van-cell title="证件类型" v-model="treatForm.documentType" />-->
<!--            <van-cell title="证件号码" v-model="treatForm.documentNumber"/>-->
<!--            <van-cell title="联系方式" v-model="treatForm.phoneNumber"/>-->
<!--            <van-cell title="通讯地址" v-model="treatForm.postalAddress"/>-->

<!--            <van-cell title="委托代理人" v-model="treatForm.agent"/>-->
<!--            <van-cell title="代理人证件类型" v-model="treatForm.agentDocumentType"/>-->
<!--            <van-cell title="代理人证件号码" v-model="treatForm.agentDocumentNumber"/>-->
<!--            <van-cell title="代理人联系方式" v-model="treatForm.agentPhoneNumber"/>-->
<!--            <van-cell title="代理人通讯地址" v-model="treatForm.agentPostalAddress"/>-->
<!--            <van-cell title="听证主持人" v-model="treatForm.hearingHost"/>-->
<!--            <van-cell title="听证主持人执法证号" v-model="treatForm.hearingHostNum"/>-->
<!--            <van-cell title="听证记录人" v-model="treatForm.hearingRecorder"/>-->
<!--            <van-cell title="听证记录人执法证号" v-model="treatForm.hearingRecorderNum"/>-->
<!--            <van-cell title="主持听证机关" v-model="treatForm.hearingAuthority"/>-->
<!--            <van-cell title="听证记录" :label="treatForm.hearingRecord"/>-->
<!--            <van-cell title="听证会报告事项" :label="treatForm.hearingReportMatters"/>-->
<!--          </div>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">案件处理意见<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="案件事实及依据" :label="treatForm.caseEvidence" />-->
<!--          <van-cell title="裁量依据及理由" :label="treatForm.caseReason" />-->
<!--          <van-cell title="陈述申辩或听证情况" :label="treatForm.caseSituation" />-->
<!--          <van-cell title="处罚意见" :label="treatForm.caseOpinion"/>-->
<!--          <van-cell title="处罚决定" :label="treatForm.caseDecision" />-->
<!--        </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>-->
<!--          <van-uploader v-if="treatForm.attachement != null" v-model="treatForm.attachementList" multiple :show-upload="false" :deletable="false" />-->
<!--          <van-empty v-else description="暂无文件" />-->
<!--        </div>-->

<!--        <p class="splcTit">审批流程</p>-->
<!--        <div class="main_box2">-->
<!--          <van-row v-for="(item,index) in treatHistoryList" :key="index">-->
<!--            <van-col :span="4">-->
<!--              <p class="index">{{index+1}}</p>-->
<!--              <div class="indexBorder" :class="{'indexCenter':index==0 ? false : true}">-->
<!--                <p class="ssT" v-if="index>0"></p>-->
<!--                <p class="yq"></p>-->
<!--                <p class="ss" v-if="treatHistoryList.length != index+1"></p>-->
<!--              </div>-->
<!--            </van-col>-->
<!--            <van-col :span="20">-->
<!--              <van-cell :title="item.activityName" center :border="false">-->
<!--                <template #default>-->
<!--                  <p style="color: #666666;">{{ item.assigneeName }}</p>-->
<!--                </template>-->
<!--              </van-cell>-->

<!--              <van-cell center :border="false">-->
<!--                <template #title>-->
<!--                  <p style="color: #999999;">{{ item.endTime }}</p>-->
<!--                </template>-->
<!--                <template #default>-->
<!--                  <p style="color: #999999;">{{ item.durationInMillis }}</p>-->
<!--                </template>-->
<!--              </van-cell>-->

<!--              <p class="bq">审批意见：{{ item.comment }}</p>-->
<!--            </van-col>-->
<!--          </van-row>-->
<!--        </div>-->

<!--        <div class="main_box examine_box" v-if="caseActive == 4 && type == 'waiting'">-->
<!--          <van-row type="flex" justify="space-between" align="center">-->
<!--            <van-col span="5">审批<br/>意见</van-col>-->
<!--            <van-col span="19">-->
<!--              <van-radio-group v-model="pass" direction="horizontal" @change="radioChange">-->
<!--                <van-radio name="true">同意</van-radio>-->
<!--                <van-radio name="false">驳回</van-radio>-->
<!--              </van-radio-group>-->
<!--              <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="审批意见"/>-->
<!--            </van-col>-->
<!--          </van-row>-->
<!--        </div>-->
<!--        <div style="margin: 16px 2%;" v-if="caseActive == 4 && type == 'waiting'">-->
<!--          <van-row>-->
<!--            <van-col span="24" align="center">-->
<!--              <van-button type="info" native-type="submit" @click="submitTreat" class="submitButtonActive">提交</van-button>-->
<!--            </van-col>-->
<!--          </van-row>-->
<!--          <div class="clear"></div>-->
<!--        </div>-->
<!--      </van-tab>-->
<!--      &lt;!&ndash;      裁决&ndash;&gt;-->
<!--      <van-tab v-show="progressLength>=7" v-if="caijueShow" :disabled="5 <= caseActive ? false : true">-->
<!--        <template #title>-->
<!--          <div-->
<!--            :class="{ finish: 6 <= caseActive , notStarted: 6 > caseActive , ongoing: 5 == caseActive }"-->
<!--          >-->
<!--            <p>裁决</p>-->
<!--            <p>-->
<!--              <van-icon name="success" v-if="6 <= caseActive"/>-->
<!--              <van-icon name="circle" v-if="caseActive == 5"/>-->
<!--            </p>-->
<!--          </div>-->
<!--        </template>-->
<!--        <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="案件名称" v-model="decisionForm.caseName"/>-->
<!--          <van-cell title="关联方案" v-model="decisionForm.schemeId"/>-->
<!--        </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 tEnforceDecisionHandlerList" :key="index">-->
<!--              <van-col :span="4">{{index+1}}</van-col>-->
<!--              <van-col :span="10">{{item.enforcerName}}</van-col>-->
<!--              <van-col :span="10">{{item.enforcerNum}}</van-col>-->
<!--            </van-row>-->

<!--          </div>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">送达文书<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="送达文书名称" v-model="decisionForm.deliveryName" />-->
<!--          <van-cell title="送达文书编号" v-model="decisionForm.deliveryNum" />-->
<!--          <van-cell title="受送达人姓名或名称" v-model="decisionForm.deliveryPersonName"/>-->
<!--          <van-cell title="送达单位" v-model="decisionForm.deliveryUnit"/>-->
<!--          <van-cell title="送达方式" v-model="decisionForm.deliveryWay" />-->
<!--          <van-cell title="送达时间" v-model="decisionForm.deliveryTime" />-->
<!--          <van-cell title="送达地点" v-model="decisionForm.deliveryAddress"/>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">行政处罚<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="缴款时间" v-model="decisionForm.payTime" />-->
<!--          <van-cell title="缴款地点" v-model="decisionForm.payAddress" />-->
<!--          <van-cell title="上诉部门" v-model="decisionForm.appealDept"/>-->
<!--          <van-cell title="行政部门" v-model="decisionForm.administrativeDept"/>-->
<!--          <van-cell title="诉讼部门" v-model="decisionForm.lawsuitDept" />-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">案件信息<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="备案" label="行政处罚" />-->
<!--          <van-cell title="案件当前状态" :label="decisionForm.surveyStatus" />-->
<!--        </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>-->
<!--          <van-uploader v-if="decisionForm.attachement != null" v-model="decisionForm.attachementList" multiple :show-upload="false" :deletable="false" />-->
<!--          <van-empty v-else description="暂无文件" />-->
<!--        </div>-->
<!--      </van-tab>-->
<!--      &lt;!&ndash;      执行&ndash;&gt;-->
<!--      <van-tab v-show="progressLength>=8" v-if="zhixingShow" :disabled="6 <= caseActive ? false : true">-->
<!--        <template #title>-->
<!--          <div-->
<!--            :class="{ finish: 7 <= caseActive , notStarted: 7 > caseActive , ongoing: 6 == caseActive }"-->
<!--          >-->
<!--            <p>执行</p>-->
<!--            <p>-->
<!--              <van-icon name="success" v-if="7 <= caseActive"/>-->
<!--              <van-icon name="circle" v-if="caseActive == 6"/>-->
<!--            </p>-->
<!--          </div>-->
<!--        </template>-->
<!--        <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="案件名称" v-model="executeForm.caseName"/>-->
<!--          <van-cell title="关联方案" v-model="executeForm.schemeId"/>-->
<!--        </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 tEnforceExecuteHandlerList" :key="index">-->
<!--              <van-col :span="4">{{index+1}}</van-col>-->
<!--              <van-col :span="10">{{item.enforcerName}}</van-col>-->
<!--              <van-col :span="10">{{item.enforcerNum}}</van-col>-->
<!--            </van-row>-->

<!--          </div>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">处罚催告<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="滞纳罚款日期" v-model="executeForm.fineTime" />-->
<!--          <van-cell title="加处罚款金额(元)" v-model="executeForm.fineMoney" />-->
<!--        </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>-->
<!--          <van-uploader v-if="executeForm.attachement != null" v-model="executeForm.attachementList" multiple :show-upload="false" :deletable="false" />-->
<!--          <van-empty v-else description="暂无文件" />-->
<!--        </div>-->
<!--      </van-tab>-->
<!--      &lt;!&ndash;      备案&ndash;&gt;-->
<!--      <van-tab v-if="caseActive == 7" :disabled="7 <= caseActive ? false : true">-->
<!--        <template #title>-->
<!--          <div-->
<!--            :class="{ finish: 8 <= caseActive , notStarted: 8 > caseActive , ongoing: 7 == caseActive }"-->
<!--          >-->
<!--            <p>备案</p>-->
<!--            <p>-->
<!--              <van-icon name="success" v-if="8 <= caseActive"/>-->
<!--              <van-icon name="circle" v-if="caseActive == 7"/>-->
<!--            </p>-->
<!--          </div>-->
<!--        </template>-->
<!--        <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="案件名称" v-model="onrecordForm.caseName"/>-->
<!--          <van-cell title="关联方案" v-model="onrecordForm.schemeId"/>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_xwxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">案件信息<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <div v-if="onrecordForm.recordType=='1'">-->
<!--            <van-cell title="备案" value="交办执法" />-->
<!--            <van-cell title="交办原因" :label="onrecordForm.assignReason" />-->
<!--            <van-divider>交办单位</van-divider>-->
<!--            <van-cell title="交办单位" v-model="onrecordForm.assignDept" />-->
<!--            <van-cell title="辖区名称" v-model="onrecordForm.regionName" />-->
<!--          </div>-->
<!--          <div v-if="onrecordForm.recordType=='2'">-->
<!--            <van-cell title="备案" value="无违法行为" />-->
<!--            <van-cell title="案件结果" v-model="onrecordForm.surveyResult" />-->
<!--          </div>-->
<!--          <div v-if="onrecordForm.recordType=='3'">-->
<!--            <van-cell title="备案" value="刑事追责" />-->
<!--            <van-cell title="案件状态" v-model="onrecordForm.caseStatus" />-->
<!--            <van-divider>移送信息</van-divider>-->
<!--            <van-cell title="移送公安局" v-model="onrecordForm.transferPolice" />-->
<!--            <van-cell title="抄送" v-model="onrecordForm.transferCopy" />-->
<!--            <van-cell title="联系人" v-model="onrecordForm.contacts" />-->
<!--            <van-cell title="联系电话" v-model="onrecordForm.phone" />-->
<!--          </div>-->
<!--          <div v-if="onrecordForm.recordType=='4'">-->
<!--            <van-divider>办理人员</van-divider>-->
<!--            <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 tEnforceOnrecordHandlerList" :key="index">-->
<!--                <van-col :span="4">{{index+1}}</van-col>-->
<!--                <van-col :span="10">{{item.enforcerName}}</van-col>-->
<!--                <van-col :span="10">{{item.enforcerNum}}</van-col>-->
<!--              </van-row>-->
<!--            </div>-->
<!--            <van-divider>处罚整改</van-divider>-->
<!--            <van-cell title="处罚时间" v-model="onrecordForm.punishStartTime" />-->
<!--            <van-cell title="责令整改期限" v-model="onrecordForm.rectifyTime" />-->
<!--            <van-cell title="违法事实" v-model="onrecordForm.breakFact" />-->
<!--            <van-cell title="处罚依据" v-model="onrecordForm.punishmentBase" />-->
<!--            <van-cell title="违反条例" v-model="onrecordForm.punishContent" />-->
<!--            <van-cell title="告知事项">-->
<!--              <template #label>-->
<!--                <p>1、当事人应当对违法行为立即或者在{{onrecordForm.correctDays}}日内予以纠正；</p>-->
<!--                <p>2、当事人必须在收到处罚决定书之日起15日内持本决定书到 {{onrecordForm.punishAddress}} 缴纳罚款。逾期不缴纳的,每日按罚款数额的3%加处罚款；</p>-->
<!--                <p>3、对本处罚决定不服的，可以在收到本处罚决定书之日起60日内向 {{onrecordForm.peopleGov}} 人民政府或者-->
<!--                  {{onrecordForm.reviewGov}} 申请行政复议；或者六个月内向-->
<!--                  {{onrecordForm.peopleCourt}} 人民法院提起行政诉讼。-->
<!--                </p>-->
<!--              </template>-->
<!--            </van-cell>-->
<!--            <van-cell title="是否当场执行" v-model="onrecordForm.spotExecute" />-->
<!--            <van-cell title="其他执行方式" v-model="onrecordForm.executModes" />-->
<!--            <van-cell title="拒不改正办法" v-model="onrecordForm.refusalCorrect" />-->
<!--            <van-cell title="改正违法行为" v-model="onrecordForm.unillegal" />-->
<!--            <van-cell title="联系人" v-model="onrecordForm.contacts" />-->
<!--            <van-cell title="联系电话" v-model="onrecordForm.phone" />-->
<!--            <van-divider>案件信息</van-divider>-->
<!--            <van-cell title="备案" value="简易程序" />-->
<!--            <van-cell title="案件结果" v-model="onrecordForm.surveyResult" />-->
<!--          </div>-->
<!--          <div v-if="onrecordForm.recordType=='5'">-->
<!--            <van-cell title="备案" value="违法不予立案" />-->
<!--            <van-cell title="案件结果" v-model="onrecordForm.surveyResult" />-->
<!--          </div>-->
<!--          <div v-if="onrecordForm.recordType=='6'">-->
<!--            <van-cell title="备案" value="撤销立案" />-->
<!--            <van-cell title="案件结果" v-model="onrecordForm.surveyResult" />-->
<!--          </div>-->
<!--          <div v-if="onrecordForm.recordType=='7'">-->
<!--            <van-cell title="备案" value="不予行政处罚" />-->
<!--            <van-cell title="案件结果" v-model="onrecordForm.surveyResult" />-->
<!--          </div>-->
<!--        </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>-->
<!--          <van-uploader v-if="executeForm.attachement != null" v-model="executeForm.attachementList" multiple :show-upload="false" :deletable="false" />-->
<!--          <van-empty v-else description="暂无文件" />-->
<!--        </div>-->
<!--      </van-tab>-->
<!--      &lt;!&ndash;      结案&ndash;&gt;-->
<!--      <van-tab v-if="caseActive == 8" :disabled="8 <= caseActive ? false : true">-->
<!--        <template #title>-->
<!--          <div-->
<!--            :class="{ finish: 9 <= caseActive , notStarted: 9 > caseActive , ongoing: 8 == caseActive }"-->
<!--          >-->
<!--            <p>结案</p>-->
<!--            <p>-->
<!--              <van-icon name="success" v-if="9 <= caseActive"/>-->
<!--              <van-icon name="circle" v-if="caseActive == 8"/>-->
<!--            </p>-->
<!--          </div>-->
<!--        </template>-->
<!--        <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="endingForm.caseName"/>-->
<!--          <van-cell title="关联方案" :value="endingForm.schemeId"/>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_cfky.png" size="20"></van-icon>-->
<!--              <span class="custom-title">罚没物品处理<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="执行人" :value="endingForm.executeName"/>-->
<!--          <van-cell title="记录人" :value="endingForm.recordName"/>-->
<!--          <van-cell title="处理日期" :value="endingForm.dealDate"/>-->
<!--          <van-cell title="处理地点" :value="endingForm.dealAddress"/>-->
<!--          <van-cell title="处理物品" :value="endingForm.dealGoods"/>-->
<!--          <van-cell title="处理来源" :value="endingForm.goodsSource"/>-->
<!--          <van-cell title="处理情况" :label="endingForm.dealCondition"/>-->
<!--        </div>-->

<!--        <div class="main_box">-->
<!--          <van-cell>-->
<!--            <template #title>-->
<!--              <van-icon name="../../../static/images/lawEnforcement/icon/icon_ajxx.png" size="20"></van-icon>-->
<!--              <span class="custom-title">案件信息<i class="bgBlue"></i></span>-->
<!--            </template>-->
<!--          </van-cell>-->
<!--          <van-cell title="结案" value="已执行"/>-->
<!--          <van-cell title="案件结果" :label="endingForm.surveyResult"/>-->
<!--          <van-cell title="罚款缴纳类型" :value="endingForm.agingStatus"/>-->

<!--          <div v-if="endingForm.agingStatus=='1'">-->
<!--            <van-cell title="申请时间" :value="endingForm.applyTime"/>-->
<!--            <van-cell title="总金额" :value="endingForm.totalMoney"/>-->
<!--            <van-cell title="分期缴纳期数" :value="endingForm.agingNum"/>-->
<!--            <van-cell title="缴纳时间" :value="endingForm.payTime"/>-->
<!--            <van-cell title="每期缴纳金额" :value="endingForm.payMoney"/>-->
<!--          </div>-->

<!--          <div v-if="endingForm.agingStatus=='2'">-->
<!--            <van-cell title="申请时间" :value="endingForm.applyTime"/>-->
<!--            <van-cell title="缴纳期限时间" :value="endingForm.payDeadline"/>-->
<!--          </div>-->
<!--        </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>-->
<!--          <van-uploader v-if="endingForm.attachement != null" v-model="endingForm.attachementList" multiple :show-upload="false" :deletable="false" />-->
<!--          <van-empty v-else description="暂无文件" />-->
<!--        </div>-->
<!--      </van-tab>-->
      </template>
    </van-tabs>

    <van-popup v-model="showAskStartTime" position="bottom">
      <van-datetime-picker
        v-model="askStartTime"
        type="datetime"
        title="选择年月日"
        @confirm="onConfirmAskStartTime"
        @cancel="showAskStartTime = false"
      />
    </van-popup>

    <van-popup v-model="showAskEndTime" position="bottom">
      <van-datetime-picker
        v-model="askEndTime"
        type="datetime"
        title="选择年月日"
        @confirm="onConfirmAskEndTime"
        @cancel="showAskEndTime = false"
      />
    </van-popup>

    <van-popup v-model="showHandleDate" position="bottom">
      <van-datetime-picker
        v-model="handleDate"
        type="date"
        title="选择年月日"
        @confirm="onConfirmHandleDate"
        @cancel="showHandleDate = false"
      />
    </van-popup>

    <van-popup v-model="showShouanDate" position="bottom">
      <van-datetime-picker
        v-model="shouanDate"
        type="date"
        title="选择年月日"
        @confirm="onConfirmShouanDate"
        @cancel="showShouanDate = false"
      />
    </van-popup>

    <van-popup v-model="showSealDate" position="bottom">
      <van-datetime-picker
        v-model="sealDate"
        type="date"
        title="选择年月日"
        @confirm="onConfirmSealDate"
        @cancel="showSealDate = false"
      />
    </van-popup>

    <van-popup v-model="showSealTimeliness" position="bottom">
      <van-datetime-picker
        v-model="sealTimeliness"
        type="date"
        title="选择年月日"
        @confirm="onConfirmSealTimeliness"
        @cancel="showSealTimeliness = false"
      />
    </van-popup>

    <van-popup v-model="showSamplingTime" position="bottom">
      <van-datetime-picker
        v-model="samplingTime"
        type="date"
        title="选择年月日"
        @confirm="onConfirmSamplingTime"
        @cancel="showSamplingTime = false"
      />
    </van-popup>

    <van-popup v-model="showProductTimeNum" position="bottom" get-container="#app">
      <van-datetime-picker
        v-model="productTimeNum"
        type="date"
        title="选择年月日"
        @confirm="onConfirmProductTimeNum"
        @cancel="showProductTimeNum = false"
      />
    </van-popup>

    <van-popup v-model="showTimeliness" position="bottom" get-container="#app">
      <van-datetime-picker
        v-model="timeliness"
        type="date"
        title="选择年月日"
        @confirm="onConfirmTimeliness"
        @cancel="showTimeliness = false"
      />
    </van-popup>

    <van-popup v-model="showConfirmTimeliness" position="bottom" get-container="#app">
      <van-datetime-picker
        v-model="confirmTimeliness"
        type="date"
        title="选择年月日"
        @confirm="onConfirmConfirmTimeliness"
        @cancel="showConfirmTimeliness = false"
      />
    </van-popup>

    <van-popup v-model="showSurveyStartTime" position="bottom" get-container="#app">
      <van-datetime-picker
        v-model="confirmSurveyStartTime"
        type="datetime"
        title="选择年月日"
        @confirm="onConfirmSurveyStartTime"
        @cancel="showSurveyStartTime = false"
      />
    </van-popup>

    <van-popup v-model="showSurveyEndTime" position="bottom" get-container="#app">
      <van-datetime-picker
        v-model="confirmSurveyEndTime"
        type="datetime"
        title="选择年月日"
        @confirm="onConfirmSurveyEndTime"
        @cancel="showSurveyEndTime = false"
      />
    </van-popup>

    <van-popup v-model="showSurveyResult" position="bottom">
      <van-picker
        show-toolbar
        value-key="dictLabel"
        :columns="surveyForm.isApprove == 'Y' ? surveyResultOptionsY:surveyResultOptionsN"
        @confirm="onConfirmSurveyResult"
        @cancel="showSurveyResult = false"
      />
    </van-popup>
  </div>
</template>
<script>
import {
  getCase ,
  schemeOptionList ,
  treeselect ,
  getSurveyByCaseId ,
  getputRecordByCaseId ,
  getSamplingByCaseId ,
  getEvidenceByCaseId ,
  getReportByGoodsId ,
  getEnforcerList ,
  getTreatByCaseId ,
  getDecisionByCaseId ,
  getExecuteByCaseId ,
  getEndingByCaseId ,
  progressList ,
  getOnrecordByCaseId,
  getDeptName,
  addSurvey,
  updateSurvey,
  addProgress,
  updateCase,
  addOnrecord,
  commonUpload,
  updatePutrecord,
  updateSampling,
  addSampling,
  addPutrecord,
  updateEvidence,
  addEvidence,
  caseHandlerList,
  enforceLockinCount,
  getCaseNum
} from "@/api/lawEnforcement/index";
import law from "@/components/common/law_footer";
import request from "@/utils/request";
import Cookies from "js-cookie";
export default {
  name: "index",
  components: {
    law
  },
  data() {
    return {
      showBankType:false,
      showPayeeType:false,
      showPicker:false,
      showAskStartTime:false,
      showAskEndTime:false,
      showHandleDate:false,
      showShouanDate:false,
      showSurveyResult:false,
      showSealDate:false,
      showSealTimeliness:false,
      showSamplingTime:false,
      showTimeliness:false,
      showProductTimeNum:false,
      showConfirmTimeliness:false,
      showSurveyStartTime:false,
      showSurveyEndTime:false,

      form:{},
      caseProgress:0,
      caseActive:0,
      goodsIndex: 0,

      bankType:'',
      payeeType:'',
      value:'',
      type:'',
      surveyResult:'',
      progressLength:0,

      zhenchaShow:true,
      lianShow:true,
      quzhengShow:true,
      chuliShow:true,
      caijueShow:true,
      zhixingShow:true,

      pass: "true",
      comment: "同意",

      bankTypeOptions:[],
      payeeTypeOptions:[],
      attachementOption:[],
      savePlaceOptions:[],
      qualityStatusOptions:[],
      samplingSceneOptions:[],
      conclusionOptions:[],
      surveyResultOptions:[],
      surveyResultOptionsY:[],
      surveyResultOptionsN:[],
      askStartTime:new Date(),
      askEndTime:new Date(),
      handleDate:new Date(),
      shouanDate:new Date(),
      sealDate:new Date(),
      sealTimeliness:new Date(),
      samplingTime:new Date(),
      timeliness:new Date(),
      productTimeNum:new Date(),
      confirmTimeliness:new Date(),

      confirmSurveyStartTime:new Date(),
      confirmSurveyEndTime:new Date(),
      fileList: [
        { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
        // Uploader 根据文件后缀来判断是否为图片文件
        // 如果图片 URL 中不包含类型信息，可以添加 isImage 标记来声明
        { url: 'https://cloud-image', isImage: true },
      ],

      // 勘察表单参数
      surveyForm: {
        id: null,
        caseId: null,
        surveyStartTime: null,
        surveyEndTime: null,
        dangshiren: null,
        recorder: null,
        askRecorder: null,
        surveyAddr: null,
        surveyDescription: null,
        isSpotCheck: "N",
        handleDate: this.format(new Date(),'yyyy-MM-dd'),
        reason: null,
        shouanDate: null,
        isApprove: "Y",
        surveyResult: "4",
        askStartTime: this.format(new Date(),'yyyy-MM-dd'),
        askEndTime: this.format(new Date(),'yyyy-MM-dd'),
        askAddr: null,
        recorder: null,
        askedName: null,
        askedPhone: null,
        handleDate: null,
        idCard: null,
        gender: "1",
        workCompany: null,
        workPosition: null,
        address: null,
        question: null,
        answer: null,
        isClear: "Y",
        isAvoid: "N",
        attachement: null,
        applyUserId: null,
        applyUserName: null,
        applyTime: null,
        instanceId: null,
        processKey: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        caseName: "",
        schemeId: "",
      },

      // 立案表单参数
      putRecordForm: {
        id: null,
        caseId: null,
        illegalAct: null,
        punishContent: null,
        sealDate: null,
        sealDays: null,
        sealTimeliness: null,
        savePlace: "1",
        savePlaceAddress: null,
        sceneCondition: null,
        appealUnit: null,
        progressCase: null,
        attachement: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        caseName: "",
        schemeId: "",
      },
      //勘察表单参数
      samplingForm:{
        id: null,
        caseId: null,
        samplingType: '2', // 此为立案页面,type默认为2立案抽样
        samplingScene: '1',
        samplingTime: null,
        samplingPlace: null,
        linkman: null,
        linkPhone: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      },
      // 取证表单参数
      evidenceForm: {
        id: null,
        caseId: null,
        detectionResult: null,
        reviewUnit: null,
        reviewTime: null,
        linkman: null,
        linkPhone: null,
        investigationProcess: null,
        allegedIllegal: null,
        violationRegulations: null,
        punishmentBase: null,
        caseDocuments: null,
        conclusion: "1",
        penaltyDecision: null,
        attachement: null,
        applyUserId: null,
        applyUserName: null,
        applyTime: null,
        instanceId: null,
        processKey: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      },
      // 检测报告表单参数
      reportForm: {
        id: null,
        goodsId: null,
        reportNum: null,
        qualityStatus: null,
        attachement: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      },
      // 处理表单参数
      treatForm: {
        id: null,
        caseId: null,
        isHearing: "Y",
        hearingStartTime: null,
        hearingEndTime: null,
        place: null,
        proposer: null,
        director: null,
        documentType: null,
        documentNumber: null,
        phoneNumber: null,
        postalAddress: null,
        agent: null,
        agentDocumentType: null,
        agentDocumentNumber: null,
        agentPhoneNumber: null,
        agentPostalAddress: null,
        hearingHost: null,
        hearingHostNum: null,
        hearingRecorder: null,
        hearingRecorderNum: null,
        hearingAuthority: null,
        hearingRecord: null,
        hearingReportMatters: null,
        caseEvidence: null,
        caseReason: null,
        caseSituation: null,
        caseOpinion: "1",
        caseDecision: null,
        attachement: null,
        applyUserId: null,
        applyUserName: null,
        applyTime: null,
        instanceId: null,
        processKey: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        caseName: "",
        schemeId: "",
      },
      // 裁决表单参数
      decisionForm: {
        id: null,
        caseId: null,
        deliveryName: null,
        deliveryNum: null,
        deliveryPersonName: null,
        deliveryUnit: null,
        deliveryWay: null,
        deliveryTime: null,
        deliveryAddress: null,
        payTime: null,
        payAddress: null,
        appealDept: null,
        administrativeDept: null,
        lawsuitDept: null,
        surveyStatus: null,
        attachement: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        caseName: "",
        schemeId: "",
      },
      // 执行表单参数
      executeForm: {
        id: null,
        caseId: null,
        fineTime: null,
        fineMoney: null,
        attachement: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        caseName: "",
        schemeId: "",
      },
      // 结案表单参数
      endingForm: {
        id: null,
        caseId: null,
        executeName: null,
        recordName: null,
        dealDate: null,
        dealAddress: null,
        dealGoods: null,
        goodsSource: null,
        dealCondition: null,
        surveyResult: null,
        agingStatus: "3",
        applyTime: null,
        totalMoney: null,
        agingNum: null,
        payTime: null,
        payMoney: null,
        payDeadline: null,
        attachement: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        caseName: "",
        schemeId: "",
      },
      // 备案表单参数
      onrecordForm: {
        id: null,
        caseId: null,
        surveyResult: null,
        recordType: null,
        punishStartTime: null,
        rectifyTime: null,
        breakFact: null,
        punishmentBase: null,
        punishContent: null,
        correctDays: null,
        punishAddress: null,
        peopleGov: null,
        reviewGov: null,
        peopleCourt: null,
        spotExecute: "0",
        executModes: null,
        refusalCorrect: null,
        unillegal: null,
        assignReason: null,
        assignDept: null,
        regionName: null,
        caseStatus: "0",
        transferPolice: null,
        transferCopy: null,
        contacts: null,
        phone: null,
        attachement: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      },
      // 办理人员列表
      tEnforceCaseHandlerList: [],
      tEnforcePutRecordHandlerList: [],
      tEnforceSamplingGoodsList: [],
      tEnforceDetainHandlerList: [],
      tEnforceEvidenceHandlerList: [],
      tEnforceTreatHandlerList: [],
      tEnforceDecisionHandlerList: [],
      tEnforceExecuteHandlerList: [],
      tEnforceOnrecordHandlerList: [],
      getDecisionByCaseId: [],
      historyList: [],
      evidencHistoryList: [],
      treatHistoryList: [],
      // 检测结果数据
      detectResults: [],
      decisionEnforcers: [],
      executeEnforcers: [],
      endingEnforcers: [],
      treatEnforcers: [],
      surveyOption: [],
      samplingOption: [],
      putRecordOption: [],
      documentTypeOptions: [],
      agingStatusOptions: [],

      // 案件执法进度 1:登记 2:勘察 3:立案 4:取证 5:处理 6:裁决 7:执行 8:备案 9:结案字典
      caseProgressOptions: [],
      successActive:0, // 当前节点的前一个已完成节点
      active: 1,  // 当前节点

      activeNames: ['1'],
      activeNames1: ['1'],
      activeNames2: ['1'],
      requestMapping: '/enforce/survey',
      openPic:[],
      openPic2:[],
      attachementOption:[]
    };
  },
  created() {
    this.caseProgress = parseInt(this.$route.query.caseProgress)-1;
    this.caseActive = parseInt(this.$route.query.caseProgress)-1 ;
    // if (parseInt(this.$route.query.caseProgress)>7){
    //   this.caseProgress = 7;
    //   this.caseActive = 7 ;
    // }else{
    //   this.caseProgress = parseInt(this.$route.query.caseProgress)-1;
    //   this.caseActive = parseInt(this.$route.query.caseProgress)-1 ;
    // }
    this.type = this.$route.query.type;
    console.log(this.caseProgress)
    this.getDicts("case_source").then(response => {
      this.caseSourceOptions = response.data;
    });
    this.getDicts("enforce_body_type").then(response => {
      this.typeOptions = response.data;
    });
    this.getDicts("sex").then(response => {
      this.sexOptions = response.data;
    });
    this.getDicts("nationality").then(response => {
      this.nationOptions = response.data;
    });
    this.getDicts("case_status").then(response => {
      this.caseStatusOptions = response.data;
    });
    // this.getDicts("case_node").then(response => {
    //   this.caseProgressOptions = response.data;
    // });
    this.getDicts("enforce_category").then(response => {
      this.enforceCategoryOptions = response.data;
    });
    this.getDicts("approve_type").then(response => {
      this.surveyResultOptions = response.data;
    });
    this.getDicts("goods_location").then(response => {
      this.savePlaceOptions = response.data;
    });
    this.getDicts("sampling_person_type").then(response => {
      this.samplingSceneOptions = response.data;
    });
    this.getDicts("quality_type").then(response => {
      this.qualityStatusOptions = response.data;
    });
    this.getDicts("conclusion_type").then(response => {
      this.conclusionOptions = response.data;
    });
    this.getDicts("cert_type").then(response => {
      this.documentTypeOptions = response.data;
    });
    this.getDicts("aging_status").then(response => {
      this.agingStatusOptions = response.data;
    });
    this.getDicts("team_category").then(response => {
      this.belongTeamOptions = response.data;
    });
    this.getDicts("approve_type").then(response => {
      response.data.map(res=>{
        if (res.dictValue == '1'||res.dictValue == '3'||res.dictValue == '4'){
          this.surveyResultOptionsY.push(res);
        }
        if (res.dictValue == '1'||res.dictValue == '2'){
          this.surveyResultOptionsN.push(res);
        }
      })
    });
    // 关联方案下拉框
    var schemeQueryParam = {
      applyStatus: "1"
    };
    schemeOptionList(schemeQueryParam).then((response) => {
      console.log(response)
      this.schemeOptions = response.data;
      this.getInformation();
    });
    // treeselect().then((response) => {
    //   this.deptOptions = response.data;
    // });
  },
  beforeRouteEnter (to, from, next) {
    /*
    to:获取你要跳转的路由信息
    from: 获取你从哪个路由来的信息
    next: （放行函数）
     // 第一种写法
    next(); // 直接放行
    // 第二种
    next('/url') //放行到指定的路由
    */
    next(vm => {
      console.log(from.path)
      console.log(to.path)
      if (from.path === '/lawEnforcement/task'){
        location.reload()
      }
    })
  },
  methods: {
    /** 保存审批意见提交 */
    submitCase() {
      const data = {
        taskId: this.surveyForm.taskId,
        instanceId: this.surveyForm.instanceId,
        variables: JSON.stringify({
          comment: this.comment,
          pass: this.pass,
          //"formData": this.row,
        }),
      };
      return request({
        url: "/activiti/process/complete",
        method: "post",
        params: data,
      }).then((response) => {
        if (response.code == 200 && response.msg == "操作成功") {
          this.$notify({ type: 'success' , message: "操作成功" });
          setTimeout(function () {
            history.back(-1);
          },1000)
        } else {
          this.$notify({ type: 'danger' , message: "操作失败" });
        }
      });
    },

    /** 保存审批意见提交 */
    submitEvidence() {
      const data = {
        taskId: this.evidenceForm.taskId,
        instanceId: this.evidenceForm.instanceId,
        variables: JSON.stringify({
          comment: this.comment,
          pass: this.pass,
          //"formData": this.row,
        }),
      };
      return request({
        url: "/activiti/process/complete",
        method: "post",
        params: data,
      }).then((response) => {
        if (response.code == 200 && response.msg == "操作成功") {
          this.$notify({ type: 'success' , message: "操作成功" });
          setTimeout(function () {
            history.back(-1);
          },1000)
        } else {
          this.$notify({ type: 'danger' , message: "操作失败" });
        }
      });
    },

    /** 保存审批意见提交 */
    submitTreat() {
      const data = {
        taskId: this.treatForm.taskId,
        instanceId: this.treatForm.instanceId,
        variables: JSON.stringify({
          comment: this.comment,
          pass: this.pass,
          //"formData": this.row,
        }),
      };
      return request({
        url: "/activiti/process/complete",
        method: "post",
        params: data,
      }).then((response) => {
        if (response.code == 200 && response.msg == "操作成功") {
          this.$notify({ type: 'success' , message: "操作成功" });
          setTimeout(function () {
            history.back(-1);
          },1000)
        } else {
          this.$notify({ type: 'danger' , message: "操作失败" });
        }
      });
    },

    getInformation(){
      getCase(this.$route.query.id).then(response => {
        console.log(response)
        response.data.schemeId = this.selectDictScheme(this.schemeOptions, response.data.schemeId);
        response.data.typeLable = this.selectDictLabel(this.typeOptions, response.data.type);
        response.data.nation = this.selectDictLabel(this.nationOptions, response.data.nation);

        response.data.caseSource = response.data.caseSource == '' ? '' : this.selectDictLabel(this.caseSourceOptions, response.data.caseSource);
        response.data.belongTeam = response.data.belongTeam == '' ? '' : this.selectDictLabel(this.belongTeamOptions, response.data.belongTeam);
        response.data.type = response.data.type == '' ? '' : this.selectDictLabel(this.typeOptions, response.data.type);
        response.data.sex = response.data.sex == '' ? '' : this.selectDictLabel(this.sexOptions, response.data.sex);
        getDeptName(response.data.deptId).then(res => {
          response.data.deptId = res.data.deptName
        });
        if (response.data.attachement){
          var attachement = response.data.attachement.split( "," );
          response.data.attachementList = []
          attachement.forEach(res=>{
            response.data.attachementList.push({
              url:'/api'+res,
              isImage: true
            });
          })
        }

        // response.data.deptId = this.selectDictDeptId(this.deptOptions, response.data.deptId);
        this.form = response.data;
        this.progressSpeed()
        // if (this.caseActive == 7){//判断是否为备案
        //
        // }else{
        //   if( this.caseActive >= 1 ){//勘察
        //     console.log("勘察")
        //     this.caseSurvey();
        //   }
        //   if( this.caseActive >= 2 ){//立案
        //     console.log("立案")
        //     this.getFileCase();
        //   }
        //   if( this.caseActive >= 3 ){//取证
        //     console.log("取证")
        //     this.getEvidenceCase();
        //   }
        //   if( this.caseActive >= 4 ){//处理
        //     console.log("处理")
        //     this.getTreat();
        //   }
        //   if( this.caseActive >= 5 ){//裁决
        //     console.log("裁决")
        //     this.getDecision();
        //   }
        //   if( this.caseActive >= 6 ){//执行
        //     console.log("执行")
        //     this.getExecuteCase();
        //   }
        //   if( this.caseActive >= 7 ){//备案
        //     console.log("备案")
        //     this.getOnrecord();
        //   }
        //   if( this.caseActive >= 8 ){//结案
        //     console.log("结案")
        //     this.getEndingForm();
        //   }
        // }
      });
    },

    //勘察表单查询
    caseSurvey(){
      // 查询勘察表单数据
      var _this = this;
      if (this.form.id != null && this.form.id != "") {
        this.surveyForm.caseId = this.form.id;
        getSurveyByCaseId(this.form.id).then(responseSurvey => {
          console.log(responseSurvey)
          if (responseSurvey.data != undefined) {
            _this.surveyForm = responseSurvey.data;
            _this.instanceId = responseSurvey.data.instanceId;
            if (responseSurvey.data.tEnforceCaseHandlerList){
              _this.tEnforceCaseHandlerList = responseSurvey.data.tEnforceCaseHandlerList;
              responseSurvey.data.tEnforceCaseHandlerList.map((responseEnforce,index)=>{
                let data = {
                  enforcerId : responseEnforce.enforcerId,
                  caseId:this.form.id,
                  relationType: "2"
                }
                enforceLockinCount(data).then(resEnforceLockin => {
                  _this.$set(_this.tEnforceCaseHandlerList[index],"num",resEnforceLockin.data)
                });
              });
            }
          }else{

          }
          if (responseSurvey.data.attachement){
            var attachement = responseSurvey.data.attachement.split( "," );
            attachement.forEach(response=>{
              this.surveyOption.push({
                url:'/api'+response,
                isImage: true
              });
              this.openPic2.push(response)
            })
          }
          // _this.surveyForm.gender = this.selectDictLabel(this.sexOptions, _this.surveyForm.gender);
          _this.surveyResult = this.selectDictLabel(this.surveyResultOptions, _this.surveyForm.surveyResult);
          _this.surveyForm.caseName = this.form.caseName;
          _this.surveyForm.schemeId = this.form.schemeId;
          // 查询审批历史记录
          // _this.getHistoryList(_this.surveyForm,'');
        });
      }
    },

    //查询立案表单数据
    getFileCase(){
      var _this = this;
      if(this.form.id != null && this.form.id !=""){
        this.putRecordForm.caseId = this.form.id;
        getputRecordByCaseId(_this.form.id).then(responsePutRecord => {
          getSamplingByCaseId(_this.form.id).then(responseSampling => {
            if(responsePutRecord.data != undefined){
              if (responsePutRecord.data.attachement){
                var attachement = responsePutRecord.data.attachement.split( "," );
                attachement.forEach(response=>{
                  this.samplingOption.push({
                    url:'/api' + response,
                    isImage: true
                  });
                })
                // process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API
              }
              _this.putRecordForm = responsePutRecord.data;
              // _this.tEnforcePutRecordHandlerList = responsePutRecord.data.tEnforceCaseHandlerList == null ? [] : responsePutRecord.data.tEnforceCaseHandlerList;
              if (responsePutRecord.data.id == ''){

                // 立案表单没有保存之前,办理人员默认获取上一节点勘察的办理人员列表
                const queryEnforcerParams = {
                  relationType: "2",
                  caseId: this.form.id
                };
                caseHandlerList(queryEnforcerParams).then(responseHandlerList => {
                  responseHandlerList.data.relationType = "3";
                  _this.tEnforcePutRecordHandlerList = responseHandlerList.data;
                  if (responseHandlerList.data){
                    responseHandlerList.data.map((responseEnforce,index)=>{
                      let data = {
                        enforcerId : responseEnforce.enforcerId,
                        caseId:this.form.id,
                        relationType: "3"
                      }
                      enforceLockinCount(data).then(resEnforceLockin => {
                        _this.$set(_this.tEnforcePutRecordHandlerList[index],"num",resEnforceLockin.data)
                      });

                    });
                  }
                });
              }else{
                _this.tEnforcePutRecordHandlerList = responsePutRecord.data.tEnforceCaseHandlerList;
                if (responsePutRecord.data.tEnforceCaseHandlerList){
                  responsePutRecord.data.tEnforceCaseHandlerList.map((responseEnforce,index)=>{
                    let data = {
                      enforcerId : responseEnforce.enforcerId,
                      caseId:this.form.id,
                      relationType: "3"
                    }
                    enforceLockinCount(data).then(resEnforceLockin => {
                      _this.$set(_this.tEnforcePutRecordHandlerList[index],"num",resEnforceLockin.data)
                    });
                  });
                }
                console.log(_this.tEnforcePutRecordHandlerList)
              }

            }else{
              _this.putRecordForm.attachement = [];
              _this.putRecordForm.attachementList = [];
            }
            if(responseSampling.data != undefined) {
              _this.samplingForm = responseSampling.data;
              _this.tEnforceSamplingGoodsList = responseSampling.data.tEnforceSamplingGoodsList;

              for (var i = 0 ; i < responseSampling.data.tEnforceSamplingGoodsList.length ; i++){
                responseSampling.data.tEnforceSamplingGoodsList[i].showTimeliness = false;
                if (responseSampling.data.tEnforceSamplingGoodsList[i].attachement != null){
                  responseSampling.data.tEnforceSamplingGoodsList[i].attachementList = [];
                  var Sampling = responseSampling.data.tEnforceSamplingGoodsList[i].attachement.split( "," );
                  Sampling.forEach(response=>{
                    responseSampling.data.tEnforceSamplingGoodsList[i].attachementList.push({
                      url:'/api' + response,
                      isImage: true
                    });
                    // process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API
                  })
                }else{
                  responseSampling.data.tEnforceSamplingGoodsList[i].attachement = [];
                }
              }
              console.log(responseSampling.data.tEnforceSamplingGoodsList)
            }

            _this.putRecordForm.caseName = this.form.caseName;
            _this.putRecordForm.schemeId = this.form.schemeId;
          });
        });
      }
    },

    //查询取证表单数据
    getEvidenceCase(){
      var _this = this;
      if (this.form.id != null && this.form.id != "") {
        this.evidenceForm.caseId = this.form.id;
        getEvidenceByCaseId(this.form.id).then(responseEvidence => {
          getSamplingByCaseId(this.form.id).then(responseSampling => {
            for (var i = 0; i < responseSampling.data.tEnforceSamplingGoodsList.length; i++) {
              let goodsId = responseSampling.data.tEnforceSamplingGoodsList[i].id;
              let goodsName = responseSampling.data.tEnforceSamplingGoodsList[i].goodsName;
              getReportByGoodsId(goodsId).then(responseReport => {
                console.log(responseReport)
                if (responseReport.data != undefined) {
                  responseReport.data.goodsId = goodsId;
                  responseReport.data.goodsName = goodsName;
                  responseReport.data.attachementList = [];
                  var Evidence = responseReport.data.attachement.split( "," );
                  console.log(Evidence)
                  Evidence.forEach(response=>{
                    responseReport.data.attachementList.push({
                      url:'/api' + response,
                    });
                  })
                  _this.detectResults.push(responseReport.data);
                } else {
                  var goodsObj = {
                    "goodsId": goodsId,
                    "goodsName": goodsName,
                    attachement:[]
                  };
                  _this.detectResults.push(goodsObj);
                }
              });
            }
            if (responseEvidence.data != undefined) {
              responseEvidence.data.attachementList = [];

              responseEvidence.data.conclusion = this.selectDictLabel(this.conclusionOptions,responseEvidence.data.conclusion)

              _this.evidenceForm = responseEvidence.data;

              if (responseEvidence.data.id == ''){

                // 取证表单没有保存之前,办理人员默认获取上一节点立案的办理人员列表
                const queryEnforcerParams = {
                  relationType: "3",
                  caseId: this.form.id
                };
                caseHandlerList(queryEnforcerParams).then(responseHandlerList => {
                  responseHandlerList.data.relationType = "4";
                  _this.tEnforceEvidenceHandlerList = responseHandlerList.data;

                  if (responseHandlerList.data){
                    responseHandlerList.data.map((responseEnforce,index)=>{
                      let data = {
                        enforcerId : responseEnforce.enforcerId,
                        caseId:this.form.id,
                        relationType: "4"
                      }
                      enforceLockinCount(data).then(resEnforceLockin => {
                        _this.$set(_this.tEnforceEvidenceHandlerList[index],"num",resEnforceLockin.data)
                      });

                    });
                  }
                });
              }else{
                _this.tEnforceEvidenceHandlerList = responseEvidence.data.tEnforceCaseHandlerList;
                if (responseEvidence.data.tEnforceCaseHandlerList){
                  responseEvidence.data.tEnforceCaseHandlerList.map((responseEnforce,index)=>{
                    let data = {
                      enforcerId : responseEnforce.enforcerId,
                      caseId:this.form.id,
                      relationType: "4"
                    }
                    enforceLockinCount(data).then(resEnforceLockin => {
                      _this.$set(_this.tEnforceEvidenceHandlerList[index],"num",resEnforceLockin.data)
                    });

                  });
                }
              }
              if (responseEvidence.data.attachement){
                var Evidence = responseEvidence.data.attachement.split( "," );
                Evidence.forEach(response=>{
                  responseEvidence.data.attachementList.push({
                    url:'/api' + response,
                  });
                })
                // process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API
              }else{
                responseEvidence.data.attachement = [];
              }
            }else{
              _this.evidenceForm.attachement = [];
            }
            setTimeout(function () {
              for (var i = 0 ; i < responseSampling.data.tEnforceSamplingGoodsList.length ; i++){
                console.log(_this.detectResults[0])
                if (responseSampling.data.tEnforceSamplingGoodsList[i].attachement){
                  responseSampling.data.tEnforceSamplingGoodsList[i].attachementList = [];
                  var Sampling = responseSampling.data.tEnforceSamplingGoodsList[i].attachement.split( "," );
                  Sampling.forEach(response=>{
                    responseSampling.data.tEnforceSamplingGoodsList[i].attachementList.push({
                      url: '/api' + response,
                    });
                    // process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API
                  })
                }else{
                  responseSampling.data.tEnforceSamplingGoodsList[i].attachement = [];
                }
              }
            },1000)
            _this.evidenceForm.caseName = this.form.caseName;
            _this.evidenceForm.schemeId = this.form.schemeId;
            // 查询审批历史记录
            _this.getHistoryList(this.evidenceForm,'evidence');
          });
        });
      }
    },

    //查询处理表单数据
    getTreat(){
      // 执行人员列表查询
      getEnforcerList().then(response => {
        const data = response.enforcerList;
        for (let i = 0; i < data.length; i++) {
          const res = {
            enforcerId: data[i].id,
            enforcerName: data[i].name,
            enforcerNum: data[i].enforceNum,
            value: data[i].name,
          };
          this.treatEnforcers.push(res);
        }
      });
      // 查询处理表单数据
      var _this = this;
      if (this.form.id != null && this.form.id != "") {
        this.treatForm.caseId = this.form.id;
        getTreatByCaseId(this.form.id).then(responseTreat => {
          console.log(responseTreat)
          if (responseTreat.data != undefined) {
            responseTreat.data.attachementList = [];
            responseTreat.data.documentType = this.selectDictLabel(this.documentTypeOptions,responseTreat.data.documentType)
            responseTreat.data.agentDocumentType = this.selectDictLabel(this.documentTypeOptions,responseTreat.data.agentDocumentType)
            _this.treatForm = responseTreat.data;
            _this.tEnforceTreatHandlerList = responseTreat.data.tEnforceCaseHandlerList;

            if (responseTreat.data.attachement){
              var Treat = responseTreat.data.attachement.split( "," );
              Treat.forEach(response=>{
                responseTreat.data.attachementList.push({
                  url:process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API + response,
                });
              })
            }
          }
          _this.treatForm.caseName = this.form.caseName;
          _this.treatForm.schemeId = this.form.schemeId;

          // 查询审批历史记录
          _this.getHistoryList(_this.treatForm,'treat');
        });
      }
    },

    //查询裁决表单数据
    getDecision(){
      // 执行人员列表查询
      getEnforcerList().then(response => {
        const data = response.enforcerList;
        for (let i = 0; i < data.length; i++) {
          const res = {
            enforcerId: data[i].id,
            enforcerName: data[i].name,
            enforcerNum: data[i].enforceNum,
            value: data[i].name,
          };
          this.decisionEnforcers.push(res);
        }
      });
      // 查询裁决表单数据
      var _this = this;
      if (this.form.id != null && this.form.id != "") {
        this.decisionForm.caseId = this.form.id;
        getDecisionByCaseId(this.form.id).then(responseDecision => {
          if (responseDecision.data != undefined) {
            console.log(responseDecision)
            responseDecision.data.attachementList = [];
            _this.decisionForm = responseDecision.data;
            _this.tEnforceDecisionHandlerList = responseDecision.data.tEnforceCaseHandlerList;

            if (responseDecision.data.attachement){
              var Treat = responseDecision.data.attachement.split( "," );
              Treat.forEach(response=>{
                responseDecision.data.attachementList.push({
                  url:process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API + response,
                });
              })
            }
          }
          _this.decisionForm.caseName = this.form.caseName;
          _this.decisionForm.schemeId = this.form.schemeId;
        });
      }
    },

    //查询执行表单数据
    getExecuteCase(){
      // 执行人员列表查询
      getEnforcerList().then(response => {
        const data = response.enforcerList;
        for (let i = 0; i < data.length; i++) {
          const res = {
            enforcerId: data[i].id,
            enforcerName: data[i].name,
            enforcerNum: data[i].enforceNum,
            value: data[i].name,
          };
          this.executeEnforcers.push(res);
        }
      });

      // 查询执行表单数据
      var _this = this;
      if (this.form.id != null && this.form.id != "") {
        this.executeForm.caseId = this.form.id;
        getExecuteByCaseId(this.form.id).then(responseExecute => {
          if (responseExecute.data != undefined) {
            responseExecute.data.attachementList = [];
            _this.executeForm = responseExecute.data;
            _this.tEnforceExecuteHandlerList = responseExecute.data.tEnforceCaseHandlerList;

            if (responseExecute.data.attachement){
              var Execute = responseExecute.data.attachement.split( "," );
              Execute.forEach(response=>{
                responseExecute.data.attachementList.push({
                  url:process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API + response,
                });
              })
            }
          }
          _this.executeForm.caseName = this.form.caseName;
          _this.executeForm.schemeId = this.form.schemeId;
        });
      }
    },

    getOnrecord(){
      // 查询备案表单数据
      if (this.form.id != null && this.form.id != "") {
        this.onrecordForm.caseId = this.form.id;
        getCase(this.form.id).then(response => {
          getOnrecordByCaseId(this.form.id).then(responseOnrecord => {
            if (responseOnrecord.data != undefined) {
              this.onrecordForm = responseOnrecord.data;
              this.tEnforceOnrecordHandlerList = responseOnrecord.data.tEnforceCaseHandlerList;
            }
            this.onrecordForm.caseName = this.form.caseName;
            this.onrecordForm.schemeId = this.form.schemeId;
          });
        });
      }
    },

    //查询结案表单数据
    getEndingForm(){
      // 执行人员列表查询
      getEnforcerList().then(response => {
        const data = response.enforcerList;
        for (let i = 0; i < data.length; i++) {
          const res = {
            enforcerId: data[i].id,
            enforcerName: data[i].name,
            enforcerNum: data[i].enforceNum,
            value: data[i].name,
          };
          this.endingEnforcers.push(res);
        }
      });
      // 查询结案表单数据
      var _this = this;
      if (this.form.id != null && this.form.id != "") {
        this.endingForm.caseId = this.form.id;
        getEndingByCaseId(this.form.id).then(responseEnding => {
          if (responseEnding.data != undefined) {
            responseEnding.data.attachementList = [];
            responseEnding.data.agingStatus = this.selectDictLabel(this.agingStatusOptions,responseEnding.data.agingStatus)
            _this.endingForm = responseEnding.data;

            if (responseEnding.data.attachement){
              var Execute = responseEnding.data.attachement.split( "," );
              Execute.forEach(response=>{
                responseEnding.data.attachementList.push({
                  url:process.env.VUE_APP_BASE_ROUTING_URL + process.env.VUE_APP_BASE_API + response,
                });
              })
            }
          }
          _this.endingForm.caseName = this.form.caseName;
          _this.endingForm.schemeId = this.form.schemeId;
        });
      }
    },

    progressSpeed(){
      console.log(this.form)
      if((this.form.caseStatus == "2" || this.form.caseStatus == "3") &&
        (this.form.caseProgress=="8" || this.form.caseProgress=="9")){
        // 已结束备案或者结案阶段的案件,查询显示已保存案件的历史流程节点
        var progressParam = {
          "caseId": this.form.id
        };
        progressList(progressParam).then(response => {
          console.log(response)
          for (var i = 0; i < response.data.length; i++) {
            var obj={
              dictLabel:response.data[i].caseProgressName,
              dictValue:response.data[i].caseProgress
            }
            this.caseProgressOptions.push(obj);
          }
        });
      } else if(this.form.caseProgress=="8" && this.form.caseStatus == "1"){
        console.log("b")
        // 进行中的案件到达备案阶段显示历史节点和备案节点
        var progressParam = {
          "caseId": this.form.id
        };
        progressList(progressParam).then(response => {
          for (var i = 0; i < response.data.length; i++) {
            var obj = {
              dictLabel: response.data[i].caseProgressName,
              dictValue: response.data[i].caseProgress
            }
            this.caseProgressOptions.push(obj);
          }
          var onrecordObj = {
            dictLabel: "备案",
            dictValue: "8"
          }
          this.caseProgressOptions.push(onrecordObj);
        });
      } else{
        console.log("c")
        // 非备案或者结案阶段的案件,显示所有节点判断状态
        this.getDicts("case_node").then(response => {
          console.log(this.form.caseProgress)
          if (this.form.caseProgress == "8") { // 结案状态
            for (var i = 0; i < response.data.length; i++) {
              if (response.data[i].dictValue != "8") { // 如果是结案,步骤条不显示备案
                this.caseProgressOptions.push(response.data[i]);
              }
            }
          } else{
            this.caseProgressOptions = response.data;
          }
        });
      }

      var that = this ;
      setTimeout(function () {
        that.zhenchaShow = false ;
        that.lianShow = false ;
        that.quzhengShow = false ;
        that.chuliShow = false ;
        that.caijueShow = false ;
        that.zhixingShow = false ;

        console.log(this.zhenchaShow)
        console.log(this.lianShow)
        console.log(this.quzhengShow)
        console.log(this.chuliShow)
        console.log(this.caijueShow)
        console.log(this.zhixingShow)
        that.progressLength = that.caseProgressOptions.length;
        console.log(that.caseProgressOptions.length-1)
        if( that.caseProgressOptions.length >= 3 && that.caseActive >= 1 ){//勘察
          console.log("勘察")
          that.caseSurvey();
          that.zhenchaShow = true ;
        }
        if( that.caseProgressOptions.length >= 4 && that.caseActive >= 2 ){//立案
          console.log("立案")
          that.getFileCase();
          that.lianShow = true ;
        }
        if( that.caseProgressOptions.length >= 5 && that.caseActive >= 3 ){//取证
          console.log("取证")
          that.getEvidenceCase();
          that.quzhengShow = true ;
        }
        if( that.caseProgressOptions.length >= 6 && that.caseActive >= 4 ){//处理
          console.log("处理")
          that.getTreat();
          that.chuliShow = true ;
        }
        if( that.caseProgressOptions.length >= 7 && that.caseActive >= 5 ){//裁决
          console.log("裁决")
          that.getDecision();
          that.caijueShow = true ;
        }
        if( that.caseProgressOptions.length >= 8 && that.caseActive >= 6 ){//执行
          console.log("执行")
          that.getExecuteCase();
          that.zhixingShow = true ;
        }
        if( that.caseActive == 8 ){//执行
          console.log("结案")
          that.caseProgress = that.caseProgressOptions.length-1;
          that.getEndingForm();
        }
        if (that.caseActive == 7){//判断是否为备案
          console.log("备案")
          that.caseProgress = that.caseProgressOptions.length-1;
          that.getOnrecord();
        }else{
          that.zhenchaShow = true ;
          that.lianShow = true ;
          that.quzhengShow = true ;
          that.chuliShow = true ;
          that.caijueShow = true ;
          that.zhixingShow = true ;
        }
      },2000)

      console.log(this.caseProgressOptions)
    },

    /** 查询审批历史展示步骤条 */
    getHistoryList(formData,type) {
      if (formData.instanceId != null && formData.instanceId != "") {
        var queryParams = {
          processInstanceId: formData.instanceId
        };
        return request({
          url: "/activiti/process/listHistory",
          method: "post",
          data: queryParams,
        }).then((response) => {
          if (type == 'evidence'){
            this.evidencHistoryList = response.rows;
            this.evidencHistoryList.forEach((row) => {
              row.startTime = this.format(row.startTime, "yyyy-MM-dd HH:mm:ss");
              row.endTime = this.format(row.endTime, "yyyy-MM-dd HH:mm:ss");
              row.durationInMillis = this.formatTotalDateSub(
                row.durationInMillis / 1000
              );
            });

          }else if (type == 'treat'){
            this.treatHistoryList = response.rows;
            this.treatHistoryList.forEach((row) => {
              row.startTime = this.format(row.startTime, "yyyy-MM-dd HH:mm:ss");
              row.endTime = this.format(row.endTime, "yyyy-MM-dd HH:mm:ss");
              row.durationInMillis = this.formatTotalDateSub(
                row.durationInMillis / 1000
              );
            });
          }else{
            this.historyList = response.rows;
            this.historyList.forEach((row) => {
              row.startTime = this.format(row.startTime, "yyyy-MM-dd HH:mm:ss");
              row.endTime = this.format(row.endTime, "yyyy-MM-dd HH:mm:ss");
              row.durationInMillis = this.formatTotalDateSub(
                row.durationInMillis / 1000
              );
            });
          }
        });
      }else{
        this.spanNum = 5;
      }
    },

    onConfirmAskStartTime(data){
      this.surveyForm.askStartTime = this.format(data,'yyyy-MM-dd HH:mm');
      this.askStartTime = data;
      this.showAskStartTime = false;
    },

    onConfirmAskEndTime(data){
      this.surveyForm.askEndTime = this.format(data,'yyyy-MM-dd HH:mm');
      this.askEndTime = data;
      this.showAskEndTime = false;
    },

    onConfirmHandleDate(data){
      this.surveyForm.handleDate = this.format(data,'yyyy-MM-dd');
      this.handleDate = data;
      this.showHandleDate = false;
    },

    onConfirmShouanDate(data){
      this.surveyForm.shouanDate = this.format(data,'yyyy-MM-dd');
      this.shouanDate = data;
      this.showShouanDate = false;
    },

    onConfirmSealDate(data){
      this.putRecordForm.sealDate = this.format(data,'yyyy-MM-dd');
      this.sealDate = data;
      this.showSealDate = false;
    },

    onConfirmSealTimeliness(data){
      this.putRecordForm.sealTimeliness = this.format(data,'yyyy-MM-dd');
      this.sealTimeliness = data;
      this.showSealTimeliness = false;
    },

    onConfirmSamplingTime(data){
      this.samplingForm.samplingTime = this.format(data,'yyyy-MM-dd');
      this.samplingTime = data;
      this.showSamplingTime = false;
    },

    onConfirmSurveyResult(data){
      this.surveyForm.surveyResult = data.dictValue;
      this.surveyResult = data.dictLabel;
      this.showSurveyResult = false;

      if (data.dictValue != '1'){
        if (data.dictValue == "3") {
          this.$set(this.surveyForm, "caseNumPartType", "简罚");
        } else if (data.dictValue == "4") {
          this.$set(this.surveyForm, "caseNumPartType", "罚");
        }

        const caseNumParam = {
          caseNumPart3: this.surveyForm.caseNumPart3,
          surveyResult: data.dictValue
        };
        getCaseNum(caseNumParam).then(response => {
          this.$set(this.surveyForm, "caseNum", response.data);
        });

        this.getDicts("case_number_title").then(response => {
          this.$set(this.surveyForm, "caseNumPart1", response.data[0].dictLabel);
        });
        // 默认显示当前年份
        let nowDate = new Date();
        console.log(this.form)
        this.$set(this.surveyForm, "caseNumPart3", nowDate.getFullYear().toString());
        this.$set(this.surveyForm, "caseNumPart2", this.form.enforceCategory);
      }

    },

    onConfirmTimeliness(data){
      this.tEnforceSamplingGoodsList[this.goodsIndex].timeliness = this.format(data,'yyyy-MM-dd');
      this.timeliness = data;
      this.showTimeliness = false;
    },

    onConfirmProductTimeNum(data){
      this.tEnforceSamplingGoodsList[this.goodsIndex].productTimeNum = this.format(data,'yyyy-MM-dd');
      this.productTimeNum = data;
      this.showProductTimeNum = false;
    },

    onConfirmConfirmTimeliness(data){
      this.tEnforceSamplingGoodsList[this.goodsIndex].confirmTimeliness = this.format(data,'yyyy-MM-dd');
      this.confirmTimeliness = data;
      this.showConfirmTimeliness = false;
    },

    onConfirmSurveyStartTime(data){
      this.surveyForm.surveyStartTime = this.format(data,'yyyy-MM-dd HH:mm');
      this.confirmSurveyStartTime = data;
      this.showSurveyStartTime = false;
    },

    onConfirmSurveyEndTime(data){
      this.surveyForm.surveyEndTime = this.format(data,'yyyy-MM-dd HH:mm');
      this.confirmSurveyEndTime = data;
      this.showSurveyEndTime = false;
    },

    addFinance(){
      this.tEnforceDetainHandlerList.push({})
    },

    addGoods(){
      // console.log(this.tEnforceSamplingGoodsList)
      // this.tEnforceSamplingGoodsList[this.goodsIndex].attachement = this.attachementOption;
      // // this.attachementOption = [];
      this.goodsIndex += 1;
      this.tEnforceSamplingGoodsList.push({attachement:[]})
    },

    addDetectResults(){
      this.detectResults.push({attachement:[]})
    },

    format(time, format) {
      var t = new Date(time);
      var tf = function (i) { return (i < 10 ? '0' : '') + i };
      return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) {
        switch (a) {
          case 'yyyy':
            return tf(t.getFullYear());
            break;
          case 'MM':
            return tf(t.getMonth() + 1);
            break;
          case 'mm':
            return tf(t.getMinutes());
            break;
          case 'dd':
            return tf(t.getDate());
            break;
          case 'HH':
            return tf(t.getHours());
            break;
          case 'ss':
            return tf(t.getSeconds());
            break;
        }
      })
    },
    /**
     * 计算出相差天数
     * @param secondSub
     */
    formatTotalDateSub (secondSub) {
      var days = Math.floor(secondSub / (24 * 3600));     // 计算出小时数
      var leave1 = secondSub % (24*3600) ;                // 计算天数后剩余的毫秒数
      var hours = Math.floor(leave1 / 3600);              // 计算相差分钟数
      var leave2 = leave1 % (3600);                       // 计算小时数后剩余的毫秒数
      var minutes = Math.floor(leave2 / 60);              // 计算相差秒数
      var leave3 = leave2 % 60;                           // 计算分钟数后剩余的毫秒数
      var seconds = Math.round(leave3);
      return days + "天" + hours + "时" + minutes + "分" + seconds + '秒';
    },

    preservation(){
      this.tEnforceCaseHandlerList.map(res=>{
        res.relationType = '2';
      })
      this.surveyForm.tEnforceCaseHandlerList = this.tEnforceCaseHandlerList;
      this.surveyForm.attachement = this.openPic2.join(',');
      if (this.surveyForm.id != null) {
        updateSurvey(this.surveyForm).then(response => {
          this.$notify({ type: 'success', message: '修改成功' });

          setTimeout(function(){
            history.back(-1);
          },2000)
        });
      } else {
        addSurvey(this.surveyForm).then(response => {
          this.$notify({ type: 'success', message: '新增成功' });
          this.surveyForm.id = response.data;

          setTimeout(function(){
            history.back(-1);
          },2000)
        });
      }
    },

    submit(){

      if (this.surveyForm.id == null) {
        this.$notify({ type: 'danger', message: '请先保存数据之后再确定提交申请' });
      } else {
        if (this.surveyForm.isApprove == "Y") { // 是否审批选择是,走工作流审批
          var id = this.surveyForm.id;
          const requestMapping = this.requestMapping;
          this.$dialog.confirm({
            message: '提交后案件将进入后续流程并且不能修改,是否确认提交?',
          }).then(function () {
            return request({
              url: requestMapping + '/submitApply/' + id,
              method: 'post',
            });
          }).then(() => {
            this.$notify({ type: 'success', message: '提交成功' });

            setTimeout(function(){
              history.back(-1);
            },2000)
          })
        } else {
          // 不审批直接更新进度到备案
          var caseId = this.surveyForm.caseId;
          var caseStatus = "1";
          var caseProgress = "8"; // 备案
          var caseParam = {
            id: caseId,
            caseId: caseId,
            caseStatus: caseStatus,
            caseProgress: caseProgress,
            caseProgressName: this.selectDictLabel(this.caseProgressOptions, caseProgress)
          };

          var progressParam = {
            id: caseId,
            caseId: caseId,
            caseStatus: caseStatus,
            caseProgress: "2", // 勘察
            caseProgressName: this.selectDictLabel(this.caseProgressOptions, "2")
          };

          var _this = this;
          this.$dialog.confirm({
            message: '提交后案件将进入后续流程并且不能修改,是否确认提交?',
          }).then(function () {
            let recordType = "";
            if (_this.surveyForm.surveyResult == "1") { // 审批程序设置 1:不予立案  2:无违法行为
              recordType = "5";  // 两个表值不一致做对应匹配
            } else if (_this.surveyForm.surveyResult == "2") {
              recordType = "2";
            }
            var onrecordParam = {
              caseId: caseId,
              recordType: recordType// 备案类型 1:交办执法 2:无违法行为 3:刑事追责 4:简易程序(处罚整改) 5:违法不予立案
            };
            addOnrecord(onrecordParam).then(response => {
              // 更新案件的节点和状态
              updateCase(caseParam).then(response => {
                addProgress(progressParam).then(response => {
                  this.$notify({ type: 'success', message: '提交成功' });

                  setTimeout(function(){
                    history.back(-1);
                  },2000)
                });
              });
            });
          });

        }
      }

    },

    /** 案件立案提交按钮 */
    submitPutRecordForm() {

      this.tEnforcePutRecordHandlerList.map(res=>{
        res.relationType = '3';
      })
      // 办理人员列表
      this.putRecordForm.tEnforceCaseHandlerList = this.tEnforcePutRecordHandlerList;
      // 查封扣押财物列表
      this.putRecordForm.tEnforceDetainHandlerList = this.tEnforceDetainHandlerList;
      // 抽样产品信息表格数据
      this.samplingForm.tEnforceSamplingGoodsList = this.tEnforceSamplingGoodsList;

      this.samplingForm.caseId = this.putRecordForm.caseId;

      if (typeof this.putRecordForm.attachement != 'string') {
        this.putRecordForm.attachement = this.putRecordForm.attachement.join(',');
      }
      this.samplingForm.tEnforceSamplingGoodsList.forEach(res=>{
        if (typeof res.attachement != 'string') {
          res.attachement = res.attachement.join(',');
        }
      })
      // this.tEnforceSamplingGoodsList[index].attachement

      console.log(this.samplingForm.tEnforceSamplingGoodsList)
      console.log(this.putRecordForm)
      console.log(this.samplingForm)

      var _this = this;
      if (this.putRecordForm.id != null) {
        updatePutrecord(this.putRecordForm).then(responsePutrecord => {
          if (responsePutrecord.code == "200") {
            if (this.samplingForm.id != null) {
              updateSampling(this.samplingForm).then(responseSampling => {
                if (responseSampling.code == "200") {
                  this.$notify({ type: 'success', message: '修改成功' });

                  setTimeout(function(){
                    history.back(-1);
                  },2000)
                }
              });
            } else {
              addSampling(this.samplingForm).then(responseSampling => {
                if (responseSampling.code == "200") {
                  this.$notify({ type: 'success', message: '新增成功' });
                  _this.samplingForm.id = responseSampling.data;

                  setTimeout(function(){
                    history.back(-1);
                  },2000)
                }
              });
            }
            _this.putRecordDiglogStatus = false;
          }
        });
      } else {
        addPutrecord(this.putRecordForm).then(responsePutrecord => {
          if (responsePutrecord.code == "200") {
            addSampling(this.samplingForm).then(responseSampling => {
              if (responseSampling.code == "200") {
                this.$notify({ type: 'success', message: '新增成功' });
                _this.putRecordForm.id = responsePutrecord.data;
                _this.samplingForm.id = responseSampling.data;

                setTimeout(function(){
                  history.back(-1);
                },2000)
              }
            });
            _this.putRecordDiglogStatus = false;
          }
        });
      }
    },

    /** 弹窗确定按钮操作 */
    submitDefine(){
      if (this.putRecordForm.id == null) {
        this.$notify({ type: 'success', message: '请先保存数据之后再确定提交申请' });
      } else {
        var id = this.putRecordForm.id;
        const requestMapping = this.requestMapping;
        this.$dialog.confirm({
          message: '提交后案件将进入后续流程并且不能修改,是否确认提交?',
        }).then(function () {
          return request({
            url: '/enforce/putrecord/submitApply/' + id,
            method: 'post',
          });
        }).then(() => {
          this.$notify({ type: 'success', message: '提交成功' });

          setTimeout(function(){
            history.back(-1);
          },2000)
        })
      }
    },

    /** 案件取证提交按钮 */
    submitEvidenceForm() {
      this.surveyDiglogStatus = false;
      this.tEnforceEvidenceHandlerList.map(res=>{
        res.relationType = '4';
      })
      this.evidenceForm.tEnforceCaseHandlerList = this.tEnforceEvidenceHandlerList;
      this.evidenceForm.detectResults = this.detectResults;
      console.log(this.evidenceForm.detectResults)
      if (typeof this.evidenceForm.attachement != 'string'){
        this.evidenceForm.attachement = this.evidenceForm.attachement.join(',');
      }

        this.evidenceForm.detectResults.forEach(res=>{
          if (typeof res.attachement != 'string'){
            res.attachement = res.attachement.join(',');
          }
        })
      if (this.evidenceForm.id != null) {
        this.surveyDiglogStatus = true;
        updateEvidence(this.evidenceForm).then(response => {
          this.$notify({ type: 'success', message: '提交成功' });
          this.surveyDiglogStatus = false;

          setTimeout(function(){
            history.back(-1);
          },2000)
        });
      } else {
        this.surveyDiglogStatus = true;
        addEvidence(this.evidenceForm).then(response => {
          this.$notify({ type: 'success', message: '提交成功' });
          this.evidenceForm.id = response.data;
          this.surveyDiglogStatus = false;

          setTimeout(function(){
            history.back(-1);
          },2000)
        });
      }
    },

    /** 弹窗确定按钮操作 */
    submitDefineEvidenceForm() {
      if (this.evidenceForm.id == null) {
        this.$notify({ type: 'success', message: '请先保存数据之后再确定提交申请' });
      } else {
        var id = this.evidenceForm.id;
        const requestMapping = this.requestMapping;
        this.$dialog.confirm({
          message: '提交后案件将进入后续流程并且不能修改,是否确认提交?',
        }).then(function () {
          return request({
            url: '/enforce/evidence/submitApply/' + id,
            method: 'post',
          });
        }).then(() => {
          this.$notify({ type: 'success', message: '提交成功' });
          this.cancel();

          setTimeout(function(){
            history.back(-1);
          },2000)
        })
      }
    },

    afterRead(file) {
      // 此时可以自行将文件上传至服务器
      this.openPic.push(file.file);
      let params1 = new FormData();
      params1.append("file", file.file);
      commonUpload(params1).then((r1) => {
        this.openPic2.push(r1.fileName);
      })
    },

    deleteFile(file,detail) {
      console.log(file)
      console.log(detail)
      this.openPic2.splice(detail.index,1);
    },

    afterReadAttachement(index){
      return(file)=>{
        let params1 = new FormData();
        params1.append("file", file.file);
        commonUpload(params1).then((r1) => {
          this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName);
        })
      }
    },

    deleteFileAttachement(index) {
      console.log(this.tEnforceSamplingGoodsList)
      return (file,detail) => {
        console.log(detail)
        this.tEnforceSamplingGoodsList[index].attachement.splice(detail.index,1);
        this.tEnforceSamplingGoodsList[index].attachementList.splice(detail.index,1);
      }
    },

    afterReadEvidence(index){
      return(file)=>{
        let params1 = new FormData();
        params1.append("file", file.file);
        commonUpload(params1).then((r1) => {
          this.detectResults[index].attachement.push(r1.fileName);
        })
      }
    },

    deleteFileEvidence(index) {
      return (file,detail) => {
        this.detectResults[index].attachement.splice(detail.index,1);
        this.detectResults[index].attachementList.splice(detail.index,1);
      }
    },

    afterReadSampling(file){
      let params1 = new FormData();
      params1.append("file", file.file);
      commonUpload(params1).then((r1) => {
        // this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName);
        this.putRecordForm.attachement.push(r1.fileName)
        console.log(this.putRecordForm)
      })
    },

    deleteFileSampling(file,detail) {
      this.putRecordForm.attachement.splice(detail.index,1);
      this.samplingOption.splice(detail.index,1);
      console.log(this.putRecordForm)
    },

    afterReadEvidenceForm(file){
      console.log(this.evidenceForm.attachement)
      let params1 = new FormData();
      params1.append("file", file.file);
      commonUpload(params1).then((r1) => {
        // this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName);
        this.evidenceForm.attachement.push(r1.fileName)
      })
    },

    deleteFileEvidenceForm(file,detail) {
      this.evidenceForm.attachement.splice(detail.index,1);
      this.evidenceForm.attachementList.splice(detail.index,1);
      console.log(this.putRecordForm)
    },

    radioChange(value){
      this.comment = value == 'true' ? '同意' : '驳回' ;
    },

    removePeople(index,type){
      if (type == 'CaseHand'){

        this.tEnforceCaseHandlerList.splice(index,1)

      }else if(type == 'PutRecord'){

        this.tEnforcePutRecordHandlerList.splice(index,1)

      }else if(type == 'evidence'){

        this.tEnforceEvidenceHandlerList.splice(index,1)

      }
    },
  },
  watch: {
    $route (to, from ) {
      // 监听路由变化, 实现类似 小程序的 onShow 事件
      if (to.path === '/lawEnforcement/taskHandle') {
        // do anything you want
        if (Cookies.get('enforcer')){
          console.log(this.enforceType)
          JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
            if (this.enforceType == 'CaseHand'){
              let array1 = this.tEnforceCaseHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
              console.log(array1)
              if ( array1.length < 1 ){
                this.tEnforceCaseHandlerList.push(res)//勘察
              }
            }
            if (this.enforceType == 'PutRecord'){
              let array1 = this.tEnforcePutRecordHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
              if ( array1.length < 1 ){
                this.tEnforcePutRecordHandlerList.push(res)//立案
              }
            }
            if (this.enforceType == 'evidence'){
              let array1 = this.tEnforceEvidenceHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
              if ( array1.length < 1 ){
                this.tEnforceEvidenceHandlerList.push(res)//取证
              }
            }
            // tEnforceCaseHandlerList
            // tEnforcePutRecordHandlerList
            // tEnforceEvidenceHandlerList
            // this.tEnforceCaseHandlerList.push(res)
          })
        }
      }
    }
  },
};
</script>

<style scoped lang="scss">
@font-face {
  font-family: SourceHanSansCNBold;
  src: url("../../../assets/fonts/SourceHanSansCN-Bold.otf");
}
.app-container {
  padding: 0;
}
.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-collapse-item__content{
  padding: 0;
}
.van-row{
  display: flex;
  flex-wrap: wrap;
}
.examine_box{
  background-color: #1D6FE9!important;
  padding: 0.18rem!important;
  padding-left: 0!important;
  border-radius: 0.15rem!important;
  margin-top: 0.3rem!important;
}
.examine_box .van-col:first-child{
  color: #FFF!important;
  font-size: 0.45rem!important;
  text-align: center!important;
}
.examine_box .van-col:last-child{
  background-color: #FFF!important;
  border-radius: 0.15rem!important;
  overflow: hidden!important;
  .van-radio-group--horizontal{
    padding: 0.2rem 0;
    border-bottom: 1px solid #eee;
  }
}
/deep/.van-tabs .van-tabs__nav{
  border: none;
  height: auto;
}
/deep/.van-radio--horizontal{
  margin-left: 20px;
  margin-right: 0;
}
.submitButtonActive{
  width: 100%;
  margin: 0 auto;
}
.van-uploader {
  padding: 15PX;
}
/deep/ .van-nav-bar--fixed{
  background: url("../../../../static/images/lawEnforcement/head_bg.png") 100%;
}
/deep/ .van-nav-bar .van-icon{
  color: #ffffff;
}
/deep/ .van-nav-bar__title{
  color: #ffffff;
}
/deep/ .van-tabs__nav--complete{
  padding: 0;
  border: none;
  height: auto;
}
/deep/ .van-tabs__nav--card .van-tab{
  border: none;
}
/deep/ .van-tabs--card>.van-tabs__wrap{
  height: auto;
  margin-top: 10PX;
}
/deep/ .van-tabs__nav--card .van-tab.van-tab--active{
  background: transparent;
  .van-tab__text{
    width: 56PX;
    height: 56PX;
    line-height: 56PX;
  }
  .finish,.ongoing,.notStarted{
    padding: 15PX 0;
  }
}
/deep/ .van-tab__text{
  display: block;
  width: 44PX;
  height: 44PX;
  background: #FFF;
  border-radius: 50%;
  border: 1px solid #C9C9C9;
  color: #C9C9C9;
  text-align: center;
  padding: 0;
  p{
    line-height: 1;
  }
}
.finish{
  border-radius: 50%;
  border: 1px solid #1DCC80;
  color: #1DCC80;
  padding: 10PX 0;
  height: 100%;
}
.ongoing{
  border-radius: 50%;
  border: 1px solid #1D6FE9;
  color: #1D6FE9;
  padding: 10PX 0;
  height: 100%;
}
.notStarted{
  padding: 10PX 0;
  height: 100%;
}
.typeBox{
  width: 44PX;
  height: 44PX;
  background: #ffffff;
  text-align: center;
  font-size: 14PX;
  border-radius: 50%;
  border: 1px solid #1DCC80;
  color: #1DCC80;
  margin: 0 auto;
  padding: 10PX 0px;
  line-height: 1;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}
.noActive{
  border: 1px solid #1D6FE9;
  color: #1D6FE9;
}
.doActive{
  border: 1px solid #C9C9C9;
  color: #C9C9C9;
}
.active{
  width: 56PX;
  height: 56PX;
  padding: 15PX 0px;
}
/deep/ .van-radio--horizontal{
  margin-left: 0.32rem;
  margin-right: 0;
}
.peopleList{
  padding: 0 3%;
  margin-top: 10PX;
  text-align: center;
  .van-row{
    margin-bottom: 10PX;
    .van-col{
      text-align: center;
      font-size: 14PX;
    }
    &:first-child{
      .van-col{
        color: #1D6FE9;
      }
    }
  }
  .icon_box{
    display: flex;
    justify-content: space-around;
    /deep/ .van-checkbox{
      justify-content: center;
    }
  }
}
.cf{
  padding: 0 3%;
  margin-top: 20PX;
  margin-bottom: 20PX;
  .van-row{
    background: #F0F3F5;
    .van-col{
      padding: 5PX 0;
      font-size: 12PX!important;
      text-align: center;
      p{
        color: #1D6FE9;
      }
    }
    &:first-child{
      background: transparent;
    }
  }
  .van-cell{
    padding: 0;
    background: transparent;
  }
}
.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;
  margin-top: 10PX;
  .van-icon{
    vertical-align: middle;
  }
  .custom-title{
    font-size: 17PX;
    color: #333333;
    vertical-align: middle;
    line-height: 1;
    position: relative;
    margin-left: 5PX;
  }
  .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;
  }
}

.addFamily{
  position: absolute;
  top: -2px;
  right: 0;
  border-radius: 50%;
}
.main_box2{
  width: 96%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 6PX;
  overflow: hidden;
  margin-top: 10PX;
  margin-bottom: 20PX;
  box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  .van-col{
    position: relative;
  }
  .van-col--20{
    padding: 12PX 0;
  }
  .van-row:nth-child(2n){
    background: rgba(29,111,233,0.1);
  }
  /deep/ .van-cell{
    background: transparent;
    padding: 0 10Px;
  }
  .bq{
    display: inline-block;
    padding: 0PX 10PX;
    line-height: 0.64rem;
    border-radius: 5PX;
  }
  .index{
    background: #1D6FE9;
    color: #ffffff;
    text-align: center;
    width: 20PX;
    height: 20PX;
    line-height: 20PX;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
  }
  .indexCenter{
    top: 0!important;
  }
  .van-row:first-child{
    .van-col:first-child{
      .indexBorder {
        top: calc(50% - 5px);
      }
    }
  }
  .indexBorder{
    width: 10PX;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    .yq{
      height: 10PX;
      width: 10PX;
      background: #C9C9C9;
      border-radius: 50%;
    }
    .ss{
      height: calc(50% - 5PX);
      width: 2PX;
      background: #C9C9C9;
      position: relative;
      left: 4PX;
    }
    .ssT{
      height: calc(50% - 5PX);
      width: 2PX;
      background: #C9C9C9;
      position: relative;
      left: 4PX;
    }
  }
}
.splcTit{
  font-size: 17PX;
  text-align: center;
  margin-top: 25PX;
  margin-bottom: 5PX;
}
.submitButton{
  width: 40%;
  margin: 0 auto;
  background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
  text-align: center;
  color: #ffffff;
  height: 70px;
  line-height: 70px;
  border-radius: 8PX;
  margin-top: 25PX;
}
.submit_box{
  display: flex;
}
</style>
