<template>
  <div id="">
    <a-layout>
      <a-layout-content style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
        <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
        <a-form :model="addObj" :label-col="{ span: 10 }" :wrapper-col="{ span: 14 }" :rules="diRongYangMaoRules" ref="addObj">
          <a-form-item label="堤顶是否路面平整、无明显凹陷、破损，雨后无积水、无杂物垃圾">
            <a-radio-group v-model:value="addObj.isTopFull">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤顶路面平整、无明显凹陷、破损" v-if="addObj.isTopFull ==='2'">
            <a-radio-group v-model:value="addObj.isTopSmth">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button v-if="addObj.isTopSmth == '1' || addObj.isTopSmth == '2'" type="link" @click="addProblem('isTopSmth', addObj.isTopSmth)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤顶雨后无积水" v-if="addObj.isTopFull ==='2'">
            <a-radio-group v-model:value="addObj.isTopWtr">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isTopWtr == '1' || addObj.isTopWtr == '2'"
                type="link"
                @click="addProblem('isTopWtr', addObj.isTopWtr)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤顶无杂物垃圾" v-if="addObj.isTopFull ==='2'">
            <a-radio-group v-model:value="addObj.isTopWst">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isTopWst == '1' || addObj.isTopWst == '2'"
                type="link"
                @click="addProblem('isTopWst', addObj.isTopWst)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="迎水坡是否护坡无破损、塌陷，草皮平整、无高杆杂草、杂灌、乔木、无杂物垃圾。">
            <a-radio-group v-model:value="addObj.isBtrFull">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="迎水坡护坡无破损、塌陷" v-if="addObj.isBtrFull ==='2'">
            <a-radio-group v-model:value="addObj.isBtrSmth">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBtrSmth == '1' || addObj.isBtrSmth == '2'"
                type="link"
                @click="addProblem('isBtrSmth', addObj.isBtrSmth)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="迎水坡护坡无高杆杂草、杂灌、乔木" v-if="addObj.isBtrFull ==='2'">
            <a-radio-group v-model:value="addObj.isBtrCats">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBtrCats == '1' || addObj.isBtrCats == '2'"
                type="link"
                @click="addProblem('isBtrCats', addObj.isBtrCats)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="迎水坡护坡草皮平整" v-if="addObj.isBtrFull ==='2'">
            <a-radio-group v-model:value="addObj.isBtrWtr">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBtrWtr == '1' || addObj.isBtrWtr == '2'"
                type="link"
                @click="addProblem('isBtrWtr', addObj.isBtrWtr)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="迎水坡护坡无杂物垃圾" v-if="addObj.isBtrFull ==='2'">
            <a-radio-group v-model:value="addObj.isBtrWst">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBtrWst == '1' || addObj.isBtrWst == '2'"
                type="link"
                @click="addProblem('isBtrWst', addObj.isBtrWst)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="背水坡是否护坡无破损、塌陷，草皮平整、无高杆杂草、杂灌、乔木、无杂物垃圾">
            <a-radio-group v-model:value="addObj.isBackFull">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="背水坡护坡无破损、塌陷" v-if="addObj.isBackFull ==='2'">
            <a-radio-group v-model:value="addObj.isBackSmth">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBackSmth == '1' || addObj.isBackSmth == '2'"
                type="link"
                @click="addProblem('isBackSmth', addObj.isBackSmth)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="背水坡护坡无高杆杂草、杂灌、乔木" v-if="addObj.isBackFull ==='2'">
            <a-radio-group v-model:value="addObj.isBtrCats">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBtrCats == '1' || addObj.isBtrCats == '2'"
                type="link"
                @click="addProblem('isBtrCats', addObj.isBtrCats)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="背水坡护坡草皮平整" v-if="addObj.isBackFull ==='2'">
            <a-radio-group v-model:value="addObj.isBackWtr">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBackWtr == '1' || addObj.isBackWtr == '2'"
                type="link"
                @click="addProblem('isBackWtr', addObj.isBackWtr)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="背水坡护坡无杂物垃圾" v-if="addObj.isBackFull ==='2'">
            <a-radio-group v-model:value="addObj.isBackWst">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isBackWst == '1' || addObj.isBackWst == '2'"
                type="link"
                @click="addProblem('isBackWst', addObj.isBackWst)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="堤身断面是否平顺，无塌陷、渗漏、洞穴、土堆、固体废弃物">
            <a-radio-group v-model:value="addObj.isSetcFull">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤身断面无塌陷" v-if="addObj.isSetcFull ==='2'">
            <a-radio-group v-model:value="addObj.isSetcCats">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isSetcCats == '1' || addObj.isSetcCats == '2'"
                type="link"
                @click="addProblem('isSetcCats', addObj.isSetcCats)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤身断面无渗漏" v-if="addObj.isSetcFull ==='2'">
            <a-radio-group v-model:value="addObj.isSetcLeak">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isSetcLeak == '1' || addObj.isSetcLeak == '2'"
                type="link"
                @click="addProblem('isSetcLeak', addObj.isSetcLeak)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤身断面无洞穴" v-if="addObj.isSetcFull ==='2'">
            <a-radio-group v-model:value="addObj.isSetcHole">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isSetcHole == '1' || addObj.isSetcHole == '2'"
                type="link"
                @click="addProblem('isSetcHole', addObj.isSetcHole)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤身断面无土堆" v-if="addObj.isSetcFull ==='2'">
            <a-radio-group v-model:value="addObj.isSetcTaft">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isSetcTaft == '1' || addObj.isSetcTaft == '2'"
                type="link"
                @click="addProblem('isSetcTaft', addObj.isSetcTaft)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤身断面无固体废弃物" v-if="addObj.isSetcFull ==='2'">
            <a-radio-group v-model:value="addObj.isSetcWst">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isSetcWst == '1' || addObj.isSetcWst == '2'"
                type="link"
                @click="addProblem('isSetcWst', addObj.isSetcWst)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="巡查通道是否通畅，无高杆杂草、杂灌、乔木、杂物垃圾">
            <a-radio-group v-model:value="addObj.isAisleFull">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="巡查通道通畅，无高杆杂草、杂灌、乔木" v-if="addObj.isAisleFull ==='2'">
            <a-radio-group v-model:value="addObj.isAisleCats">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAisleCats == '1' || addObj.isAisleCats == '2'"
                type="link"
                @click="addProblem('isAisleCats', addObj.isAisleCats)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="巡查通道通畅，无杂物垃圾" v-if="addObj.isAisleFull ==='2'">
            <a-radio-group v-model:value="addObj.isAisleWst">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAisleWst == '1' || addObj.isAisleWst == '2'"
                type="link"
                @click="addProblem('isAisleWst', addObj.isAisleWst)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="在害堤动物活动区是否有防治措施">
            <a-radio-group v-model:value="addObj.isAislePrt">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="在害堤动物活动区是否有管理措施" v-if="addObj.isAislePrt ==='2'">
            <a-radio-group v-model:value="addObj.isAisleMng">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAisleMng == '1' || addObj.isAisleMng == '2'"
                type="link"
                @click="addProblem('isAisleMng', addObj.isAisleMng)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="在害堤动物活动区是否有工程措施" v-if="addObj.isAislePrt ==='2'">
            <a-radio-group v-model:value="addObj.isAislePrjt">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAislePrjt == '1' || addObj.isAislePrjt == '2'"
                type="link"
                @click="addProblem('isAislePrjt', addObj.isAislePrjt)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="堤防工程是否无乱垦、乱挖、乱占、养禽放牧现象">
            <a-radio-group v-model:value="addObj.isAisleUsr">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤防工程是否无乱垦现象" v-if="addObj.isAisleUsr ==='2'">
            <a-radio-group v-model:value="addObj.isAisleCur">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAisleCur == '1' || addObj.isAisleCur == '2'"
                type="link"
                @click="addProblem('isAisleCur', addObj.isAisleCur)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤防工程是否无乱挖现象" v-if="addObj.isAisleUsr ==='2'">
            <a-radio-group v-model:value="addObj.isAisleDig">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAisleDig == '1' || addObj.isAisleDig == '2'"
                type="link"
                @click="addProblem('isAisleDig', addObj.isAisleDig)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤防工程是否无乱占现象" v-if="addObj.isAisleUsr ==='2'">
            <a-radio-group v-model:value="addObj.isAisleOcc">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAisleOcc == '1' || addObj.isAisleOcc == '2'"
                type="link"
                @click="addProblem('isAisleOcc', addObj.isAisleOcc)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="堤防工程是否无乱占养禽放牧现象" v-if="addObj.isAisleUsr ==='2'">
            <a-radio-group v-model:value="addObj.isAislePlty">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isAislePlty == '1' || addObj.isAislePlty == '2'"
                type="link"
                @click="addProblem('isAislePlty', addObj.isAislePlty)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>

          <a-form-item label="堤防工程管理和保护范围内是否无爆破、打井、挖沙、取土、违章建筑等危害工程安全活动；无高杆杂草、杂灌、乔木、无杂物垃圾">
            <a-radio-group v-model:value="addObj.isPrtFull">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
            </a-radio-group>
          </a-form-item>
          <p style="margin-top:10px;margin-bottom: 10px" v-if="addObj.isPrtFull ==='2'">
            <span style="width:120px;margin-left: 380px">堤防工程管理和保护范围内</span>
            <span class="hrs"> </span>
          </p>
          <a-form-item label="是否无爆破活动" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtWtr">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtWtr == '1' || addObj.isPrtWtr == '2'"
                type="link"
                @click="addProblem('isPrtWtr', addObj.isPrtWtr)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="是否无打井活动" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtWell">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtWell == '1' || addObj.isPrtWell == '2'"
                type="link"
                @click="addProblem('isPrtWell', addObj.isPrtWell)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="是否无挖沙活动" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtSand">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtSand == '1' || addObj.isPrtSand == '2'"
                type="link"
                @click="addProblem('isPrtSand', addObj.isPrtSand)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="是否无取土活动" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtSoil">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtSoil == '1' || addObj.isPrtSoil == '2'"
                type="link"
                @click="addProblem('isPrtSoil', addObj.isPrtSoil)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="是否无违章建筑" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtBld">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtBld == '1' || addObj.isPrtBld == '2'"
                type="link"
                @click="addProblem('isPrtBld', addObj.isPrtBld)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="是否无其他危害工程安全的活动" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtAct">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtAct == '1' || addObj.isPrtAct == '2'"
                type="link"
                @click="addProblem('isPrtAct', addObj.isPrtAct)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="无高杆杂草、杂灌、乔木" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtCats">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtCats == '1' || addObj.isPrtCats == '2'"
                type="link"
                @click="addProblem('isPrtCats', addObj.isPrtCats)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item label="无杂物垃圾" v-if="addObj.isPrtFull ==='2'">
            <a-radio-group v-model:value="addObj.isPrtWst">
              <a-radio value="1">是</a-radio>
              <a-radio value="2">否</a-radio>
              <a-button
                v-if="addObj.isPrtWst == '1' || addObj.isPrtWst == '2'"
                type="link"
                @click="addProblem('isPrtWst', addObj.isPrtWst)">
                <a-icon type="plus-circle" theme="filled" />
              </a-button>
            </a-radio-group>
          </a-form-item>
          <a-form-item :wrapper-col="{ span: 10, offset: 14 }">
            <a-button type="primary" @click="makesure('addObj')" v-if="openType">保 存</a-button>
          </a-form-item>
        </a-form>
      </a-layout-content>
      <problem-dialog
        v-if="showAddProblemDialog"
        :objType="58"
        :villType="58"
        :objId="rowData.objId"
        :objName="rowData.nm"
        :problemMiddleType="'堤防'"
        :problData="probId"
        @closeDialog="closePlDialog"
        :rgstrId="rowData.rgstrId"
        :szRuls="[]">
      </problem-dialog>
    </a-layout>
  </div>
</template>

<script>
import request from '../../../utils/gw_ajax_request';
import problemDialog from '../../duChaWenTi/problemDialog.vue';
export default {
  props: {
    rowData: {
      type: Object,
      default: {},
    },
    openType: {
      type: Boolean,
      default: true,
    },
  },
  components: {
    problemDialog,
  },
  data() {
    return {
      formLabelWidth: '530px',
      diRongYangMaoRules: {},
      probId: '',
      operationType1: '',
      id: '',
      objtbStatu: {
        jxqState: '',
        rgstrId: '',
        id: '',
        state: '',
      },
      rsvrRules: null,
      showAddProblemDialog: false,
      addObj: {
        isTopFull: '',
        isTopSmth: '',
        isTopWtr: '',
        isTopWst: '',
        isBtrFull: '',
        isBtrSmth: '',
        isBtrCats: '',
        isBtrWtr: '',
        isBtrWst: '',
        isBackFull: '',
        isBackSmth: '',
        isBtrCats: '',
        isBackWtr: '',
        isBackWst: '',
        isSetcFull: '',
        isSetcCats: '',
        isSetcLeak: '',
        isSetcHole: '',
        isSetcTaft: '',
        isSetcWst: '',
        isAislePrt: '',
        isAisleMng: '',
        isAislePrjt: '',
        isPrtFull: '',
        isPrtWtr: '',
        isPrtWell: '',
        isPrtSand: '',
        isPrtSoil: '',
        isPrtBld: '',
        isPrtAct: '',
        isPrtCats: '',
        isPrtWst: '',
      },
    };
  },
  computed: {
    // 监听属性 类似于data概念
    recPersId() {
      return localStorage.getItem('persId')
        ? localStorage.getItem('persId')
        : '';
    },
  },
  created() {
    this.findItemByType();
  },
  mounted() {
    if (this.rowData.rgstrId) {
      this.getInfoData();
    }
  },
  methods: {
    makesure(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.addObj['rgstrId'] = this.rowData.rgstrId;
          this.addObj['recPersId'] = this.recPersId;
          this.objtbStatu.rgstrId = this.rowData.rgstrId;
          this.objtbStatu.id = this.rowData.rgstrId;
          if (
            this.addObj.isTopFull != null &&
            this.addObj.isBtrFull != null &&
            this.addObj.isBackFull != null &&
            this.addObj.isSetcFull != null &&
            this.addObj.isAisleFull != null &&
            this.addObj.isAislePrt != null &&
            this.addObj.isAisleUsr != null &&
            this.addObj.isPrtFull != null
          ) {
            this.addObj['state'] = '2';
            this.objtbStatu.faceState = '2';
            this.objtbStatu.state = '1';
          } else if (
            this.addObj.isTopFull == null &&
            this.addObj.isBtrFull == null &&
            this.addObj.isBackFull == null &&
            this.addObj.isSetcFull == null &&
            this.addObj.isAisleFull == null &&
            this.addObj.isAislePrt == null &&
            this.addObj.isAisleUsr == null &&
            this.addObj.isPrtFull == null
          ) {
            this.objtbStatu.faceState = '0';
            this.addObj['state'] = '0';
          } else {
            this.objtbStatu.faceState = '1';
            this.objtbStatu.state = '1';
            this.addObj['state'] = '1';
          }

          this.$confirm({
            title: '提示',
            content: '确认保存运行管理情况信息吗？',
            okType: 'warning',
            onOk: () => {
              request.post('/bis/insp/dikejx/face', this.addObj).then((res) => {
                if (res.success) {
                  this.$message.success('添加成功');
                  request
                    .post('/bis/insp/dikejx/update', this.objtbStatu)
                    .then((res) => {
                      res;
                    });
                  this.$emit('addDiFangSuccess');
                }
              });
            },
          });
        }
      });
    },
    // 如果已经填报  则查询
    getInfoData() {
      request
        .get('/bis/insp/dikejx/face/' + this.rowData.rgstrId, {})
        .then((res) => {
          if (res.success) {
            this.addObj = res.data;
          }
        });
    },
    addProblem(item, iValue) {
      const rest = this.rsvrRules.filter((e) => {
        return e.iValue === iValue && e.eName === item;
      });
      if (rest[0]) {
        this.probId = rest[0].id;
      }
      this.showAddProblemDialog = true;
    },
    closePlDialog(val) {
      this.showAddProblemDialog = false;
    },
    findItemByType() {
      const obj = {
        tname: 'BIS_INSP_DIKEJX_FACE',
      };
      request
        .post('/bis/insp/item/ques/info/findItemByType', obj)
        .then((res) => {
          this.rsvrRules = res.data;
        });
    },
  },
};
</script>

<style lang='less' scoped>

</style>
