<template>
  <div class="processFeedback">
    <dym-form :componentList="editModel === 'I' || editModel === 'IS' ? componentListImplement:componentListAudit" :formValue.sync="effectResultPostDTO.notImplementAssetInfoDto"></dym-form>
    <externalTransition v-if="editModel === 'I' || editModel === 'IS'" :title="editModel === 'I' ? $t('effectDealFeedBackMain.lawFirmFeedback'): $t('effectDealFeedBackMain.implementedIssue')">
      <template slot="unfolded">
        <data-table :showPage="showPage" :sourceData.sync="effectResultPostDTO.notImplementAssetInfoDto.questionList" :columns="columns" :row-class-name="rowClassName" @onMouseOver="onMouseOver(arguments, 'LS')" maxHeight="400">
        <!-- 问题 -->
        <template #feedbackQuestionContent="scope">
          <span-plus :index="scope.data.$index" :text="scope.data.row.feedbackQuestionContent"></span-plus>
        </template>
        <!-- 统筹人复核 -->
        <template slot="effectReviewFlag" slot-scope="scope">
          <el-checkbox :index="scope.data.$index"  v-model="scope.data.row.effectReviewFlag" true-label="2" false-label="1" :disabled="scope.data.row.effectReviewDisFlag === '2'"></el-checkbox>
        </template>
        <!-- 统筹人复核头部 -->
        <template slot="effectReviewFlaghead" slot-scope="scope">
          <el-checkbox :index="scope.data.$index"  v-model="scope.data.column.prop" @change="allReviewFlag(scope.data.column.prop)" true-label="2" false-label="1"></el-checkbox>
          <span class="box-column-margin-left">{{scope.data.column.label}}</span>
        </template>
        <!-- 是否疑难问题 -->
        <template slot="difficultQustionFlag" slot-scope="scope">
          <el-checkbox :index="scope.data.$index"  v-model="scope.data.row.difficultQustionFlag" true-label="2" false-label="1"></el-checkbox>
        </template>
        <!-- 是否关联问题 -->
        <template slot="relationQustionFlag" slot-scope="scope">
          <el-checkbox :disabled="scope.data.row.relationCommonDealFlag=== '2'" :index="scope.data.$index" v-model="scope.data.row.relationQustionFlag" true-label="2" false-label="1" @change="relationQustionFlagChange(scope.data.row, scope.data.$index)"></el-checkbox>
          <auth-button :disabled="scope.data.row.relationQustionFlag === '1'" size="small" class="iconCircle box-column-margin-left" :title="$t('effectDealFeedBackMain.select')" icon="iconfont iconxuanze" @click="relationQustClick(scope.data.row, scope.data.$index, 'LS')"></auth-button>
        </template>
          <!-- 操作 -->
          <el-table-column :label="$t('common.operate')" align="center" width="100px">
            <template slot-scope="scope">
              <!-- 落实 -->
              <auth-button v-if="scope.row.implementeStatus === $t('effectDealFeedBackMain.noImplemented')" size="small" class="iconCircle marginLeft box-column-margin-left" :disabled="scope.row.relationQustionFlag === '2' || implementVisible === true"
                          :title="$t('effectDealFeedBackMain.implement')" icon="iconfont iconlashi" @click="implementation(scope.row, scope.$index, 'LS')"></auth-button>
              <!-- 落实 -->
              <auth-button v-if="scope.row.implementeStatus === $t('effectDealFeedBackMain.yesImplemented')" size="small" class="iconCircle marginLeft box-column-margin-left" :disabled="scope.row.relationQustionFlag === '2' || implementVisible === true"
                          :title="$t('effectDealFeedBackMain.afreshImplement')" icon="iconfont iconzhongxinlashi" @click="implementation(scope.row, scope.$index, 'LS')"></auth-button>
            </template>
          </el-table-column>
        </data-table>
      </template>
    </externalTransition>
    <!-- 待处理问题 -->
    <trace-audit-batch-pop v-if="editModel === 'A' || editModel === 'IS'" :form.sync="effectResultPostDTO" :effApi="proApi" :editModel="editModel"></trace-audit-batch-pop>
    <!-- 相关方处理中问题 -->
    <externalTransition v-if="editModel === 'IS' && effectResultPostDTO.relationHandlingQuestionDtoList && effectResultPostDTO.relationHandlingQuestionDtoList.length > 0" :title="$t('effectDealFeedBackMain.interrelated')">
      <template slot="unfolded">
        <data-table :showPage="showPage" :sourceData.sync="effectResultPostDTO.relationHandlingQuestionDtoList" :columns="xgfColumns" v-bind="{spanMethod:e => objectSpanMethod(effectResultPostDTO.relationHandlingQuestionDtoList,e)}" @onMouseOver="onMouseOver(arguments, 'XGF')" :row-class-name="rowXgfClassName" maxHeight="400">
          <template #fdcheckbox="scope">
            <div v-show="scope.data.row.checkboxFlag">
              <el-checkbox :index="scope.data.$index" v-model="scope.data.row.fdcheckbox" true-label="1" false-label="0"></el-checkbox>
            </div>
          </template>
          <template #lawFirmNewestFeedback="scope">
            <span-plus :index="scope.data.$index" :text="scope.data.row.lawFirmNewestFeedback"></span-plus>
          </template>
          <template #heGuiToRelationNewestReply="scope">
            <span-plus :index="scope.data.$index" :text="scope.data.row.heGuiToRelationNewestReply"></span-plus>
          </template>
          <!-- 相关履历 -->
          <template slot="relatedCurriculumVitae" slot-scope="scope">
            <auth-button size="small" class="iconCircle marginLeft" :title="$t('common.view')" icon="iconfont iconview" @click="viewMatterAnte(scope.data.row)"></auth-button>
          </template>
          <!-- 是否疑难问题 -->
          <template slot="difficultQustionFlag" slot-scope="scope">
            <el-checkbox :index="scope.data.$index"  v-model="scope.data.row.difficultQustionFlag" true-label="2" false-label="1"></el-checkbox>
          </template>
          <!-- 是否关联问题 -->
          <template slot="relationQustionFlag" slot-scope="scope">
            <el-checkbox :index="scope.data.$index" :disabled="scope.data.row.relationCommonDealFlag=== '2'" v-model="scope.data.row.relationQustionFlag" true-label="2" false-label="1"  @change="relationQustionFlagChange(scope.data.row, scope.data.$index)"></el-checkbox>
            <auth-button :disabled="scope.data.row.relationQustionFlag === '1'" size="small" class="iconCircle marginLeft box-column-margin-left" :title="$t('common.select')" icon="iconfont iconxuanze" @click="relationQustClick(scope.data.row, scope.data.$index, 'XGF')"></auth-button>
          </template>
          <!-- 操作 -->
          <template slot="operate" slot-scope="scope">
            <auth-button :disabled="scope.data.row.relationQustionFlag === '2' || implementVisible === true" size="small" class="iconCircle marginLeft" :title="$t('effectDealFeedBackMain.afreshImplement')" icon="iconfont iconzhongxinlashi" @click="implementation(scope.data.row, scope.data.$index, 'XGF')"></auth-button>
          </template>
        </data-table>
      </template>
    </externalTransition>
    <feedback-implementation v-if="implementVisible === true && (editModel === 'IS' || editModel === 'I')" :imData.sync="effectResultPostDTO"></feedback-implementation>
    <!-- 落实结果 -->
    <externalTransition v-if="implementVisible === true" :title="$t('effectDealFeedBackMain.implement')" :isCollapse="true">
      <template slot="transition">
        <effect-feed-back-content-law-sub ref="effectFeedBack" :form.sync="effectResultPostDTO" :effApi="proApi" v-on="$listeners" :code="code" :lawEditModel="editModel"></effect-feed-back-content-law-sub>
      </template>
    </externalTransition>
    <relation-qust-pop v-if="relationVisible" :visible.sync="relationVisible" :form="relationForm" @qustData="selectSaCoPro"></relation-qust-pop>
    <!-- 相关履历 -->
    <relation-his-pop v-if="relationHisVisible" :visible.sync="relationHisVisible" :form="relationHisForm"></relation-his-pop>
  </div>
</template>

<script>
import externalTransition from '@/components/element/assetoutfeedback/externalTransition'
import relationHisPop from '@/pages/assetoutfeedback/effectDealFeedBack/relationHisPop'
import auditRelationPop from '@/pages/assetoutfeedback/effectDealFeedBack/auditRelationPop'
import yesAndNoSelect from '@/components/element/assetoutfeedback/yesAndNoSelect'
import feedbackImplementation from '@/pages/assetoutfeedback/effectDealFeedBack/feedbackImplementation'
import traceAuditBatchPop from '@/pages/assetoutfeedback/effectDealFeedBack/traceAuditBatchPop'
import relationQustPop from '@/pages/assetoutfeedback/effectDealFeedBack/relationQustPop'
import effectFeedBackContentLawSub from '@/pages/assetoutfeedback/effectDealFeedBack/effectFeedBackContentLawSub'
import { dymForm, DataTable, amountInput, authButton, SelectDictionary, SpanPlus } from 'newepoch-components'
export default {
  components: { dymForm, SpanPlus, DataTable, amountInput, SelectDictionary, authButton, relationQustPop, effectFeedBackContentLawSub, feedbackImplementation, traceAuditBatchPop, externalTransition, yesAndNoSelect, relationHisPop, auditRelationPop },
  props: {
    editModel: {
      type: String,
      default () {
        return ''
      }
    },
    form: {
      type: Object,
      default () {
        return {}
      }
    },
    effApi: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  data () {
    let $this = this
    return {
      feedbackVisible: false,
      relationHisVisible: false,
      relationHisForm: {},
      imData: {},
      code: '',
      effectForm: {},
      relationForm: {},
      implementForm: {},
      changeflag: '',
      obj: {
        replyOutPostDto: {
          chapterFlag: '1',
          replyLawContent: '',
          uploadFilePostDtoList: []
        },
        replyRelationPostDtoList: []
      },
      rowClickFlag: true,
      implementVisible: false,
      relationVisible: false,
      componentListImplement: [
        {
          // 付款确认书编号
          value: 'assetCode',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].feedbackMaterialIndex.payCode,
          labelWidth: '125px',
          name: 'assetCode',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'assetCode'
        }, {
          // 供应商名称
          value: 'suppliersName',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].feedbackMaterialIndex.gys,
          labelWidth: '125px',
          name: 'suppliersName',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'suppliersName'
        }, {
          // 项目公司名称
          value: 'projectCompanyName',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].feedbackMaterialIndex.xmg,
          labelWidth: '125px',
          name: 'projectCompanyName',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'projectCompanyName'
        }, {
          // 保利金额
          value: 'factoringMoney',
          disabled: true,
          componentName: amountInput,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.factoringMoney,
          labelWidth: '125px',
          name: 'factoringMoney',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'factoringMoney'
        }, {
          // 供应商盖章方式
          value: 'suppliersStampWay',
          disabled: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.suppliersStampWay,
          labelWidth: '125px',
          name: 'suppliersStampWay',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'suppliersStampWay',
          componentName: 'el-input'
        }, {
          // 项目公司盖章方式
          value: 'projectCompanyStampWay',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.projectCompanyStampWay,
          labelWidth: '125px',
          name: 'projectCompanyStampWay',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'projectCompanyStampWay'
        }, {
          // 退单风险标记
          value: 'chargebackRiskFlag',
          disabled: false,
          componentName: yesAndNoSelect,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.chargebackRiskFlag,
          labelWidth: '125px',
          name: 'chargebackRiskFlag',
          placeholder: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.pleaseChooseyn,
          cols: [8, 8, 8, 8],
          prop: 'chargebackRiskFlag'
        }, {
          // 基础合同名称
          value: 'basicContractName',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.basicContractName,
          labelWidth: '125px',
          name: 'basicContractName',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'basicContractName'
        }, {
          // 基础合同编号
          value: 'basicContractCode',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.basicContractCode,
          labelWidth: '125px',
          name: 'basicContractCode',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'basicContractCode'
        }
      ],
      componentListAudit: [
        // 付款确认书编号
        {
          value: 'assetCode',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].feedbackMaterialIndex.payCode,
          labelWidth: '125px',
          name: 'assetCode',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'assetCode'
        }, {
          // 供应商名称
          value: 'suppliersName',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].feedbackMaterialIndex.gys,
          labelWidth: '125px',
          name: 'suppliersName',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'suppliersName'
        }, {
          // 项目公司名称
          value: 'projectCompanyName',
          disabled: true,
          componentName: 'el-input',
          label: this.$i18n.messages[this.$i18n.locale].feedbackMaterialIndex.xmg,
          labelWidth: '125px',
          name: 'projectCompanyName',
          placeholder: '',
          cols: [8, 8, 8, 8],
          prop: 'projectCompanyName'
        }
      ],
      columns: [
        {
          // 序号
          prop: 'No',
          align: 'center',
          width: '40px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.No
        }, {
          // 问题
          prop: 'feedbackQuestionContent',
          align: 'left',
          slot: true,
          width: '120px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.problem
        }, {
          // 统筹人复核
          prop: 'effectReviewFlag',
          align: 'center',
          width: '60px',
          slot: true,
          headslot: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.effectReviewFlag
        }, {
          // 是否疑难问题
          prop: 'difficultQustionFlag',
          align: 'center',
          width: '60px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.difficultQustionFlag
        }, {
          // 是否关联问题
          prop: 'relationQustionFlag',
          align: 'center',
          width: '60px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.relationQustionFlag
        }, {
          // 反馈类型
          prop: 'feedbackTimes',
          align: 'center',
          width: '50px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.feedBackType,
          format (row) {
            return row.feedbackTimes > 1 ? $this.$t('effectDealFeedBackMain.feedbackAgain') : $this.$t('effectDealFeedBackMain.feedbackOnce')
          }
        }, {
          // 落实状态
          prop: 'implementeStatus',
          align: 'center',
          width: '50px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.implementeStatus
        }
      ],
      xgfTable: [],
      xgfColumns: [
        {
          // checkbox
          prop: 'fdcheckbox',
          align: 'center',
          slot: true,
          width: '40px',
          label: ''
        }, {
          // 问题序号
          prop: 'qusetionNumber',
          align: 'center',
          width: '40px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.problemNo
        }, {
          // 律所最新一次反馈意见
          prop: 'lawFirmNewestFeedback',
          slot: true,
          align: 'left',
          width: '120px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.lawFirmNewestFeedback
        }, {
          // 合规对相关方最新一次回复
          prop: 'heGuiToRelationNewestReply',
          slot: true,
          align: 'left',
          width: '120px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.practicableSuggestion
        }, {
          // 相关方
          prop: 'relation',
          align: 'center',
          width: '60px',
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.relation
        }, {
          // 相关履历
          prop: 'relatedCurriculumVitae',
          align: 'center',
          width: '60px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.relatedCurriculumVitae
        }, {
          // 是否疑难问题
          prop: 'difficultQustionFlag',
          align: 'center',
          width: '50px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.difficultQustionFlag
        }, {
          // 是否关联问题
          prop: 'relationQustionFlag',
          align: 'center',
          width: '50px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.relationQustionFlag
        }, {
          // 操作
          prop: 'operate',
          align: 'center',
          width: '50px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].common.operate
        }
      ],
      showPage: false
    }
  },
  watch: {
  },
  computed: {
    effectResultPostDTO: {
      get: function () {
        return this.form
      },
      set: function (value) {
        this.$emit('update:form', value)
      }
    },
    proApi () {
      return this.effApi
    }
  },
  mounted () {
  },
  methods: {
    // 检测表单数据变化，填充数据
    dataChange () {
    },
    // 序号
    rowClassName ({ row, rowIndex }) {
      row.No = rowIndex + 1
    },
    rowXgfClassName ({ row, rowIndex }) {
      row.No = rowIndex + 1
    },
    // 选择问题弹窗
    relationQustClick (row, index, code) {
      Object.assign(row, { 'index': index })
      Object.assign(row, { 'code': code })
      if (row.keyId) {
        row.qstDetailKeyId = row.keyId
      }
      this.relationForm = JSON.parse(JSON.stringify(row))
      this.relationForm.keyIdList = this.form.keyIdList
      delete this.relationForm.historyDealingsSuggestionDtoList
      delete this.relationForm.relationHandlingDtoList
      delete this.relationForm.repulseSuggestionDtoList
      // console.log(this.relationForm)
      this.relationVisible = true
    },
    // 反馈落实弹窗
    implementation (row, index, code) {
      this.obj = {
        practicableResult: '1',
        replyOutPostDto: {
          chapterFlag: '1',
          replyLawContent: '',
          uploadFilePostDtoList: []
        },
        replyRelationPostDtoList: []
      }
      this.effectResultPostDTO.rowChooseIndex = index
      // this.effectResultPostDTO.checked = ['1']
      this.effectResultPostDTO.index = index
      if (code === 'LS') {
        this.code = 'LS'
        if (!this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].replyOutPostDto) {
          Object.assign(this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index], this.obj)
        }
        this.effectResultPostDTO.checked = this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].checked ? this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].checked : ['1']
      } else if (code === 'XGF') {
        this.code = 'XGF'
        if (!this.effectResultPostDTO.relationHandlingQuestionDtoList[index].replyOutPostDto) {
          Object.assign(this.effectResultPostDTO.relationHandlingQuestionDtoList[index], this.obj)
          this.effectResultPostDTO.checked = this.effectResultPostDTO.relationHandlingQuestionDtoList[index].checked ? this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].checked : ['1']
        }
      }
      this.effectResultPostDTO.checked = this.effectResultPostDTO.checked.length === 0 ? ['1'] : this.effectResultPostDTO.checked
      this.implementVisible = true
    },
    // 统筹人所有行选中
    allReviewFlag (headCheck) {
      if (this.effectResultPostDTO.notImplementAssetInfoDto.questionList.length > 0) {
        this.effectResultPostDTO.notImplementAssetInfoDto.questionList.forEach((res, i) => {
          this.effectResultPostDTO.notImplementAssetInfoDto.questionList[i].effectReviewFlag = headCheck
        })
      }
    },
    // 关闭落实结果页面
    closeLs () {
      this.implementVisible = false
    },
    // 选择关联问题checkBox
    relationQustionFlagChange (row, index) {
      if (row.relationQustionFlag === '2') {
        row.implementeStatus = this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.noImplemented
        row.checked = ['1']
        this.implementVisible = false
        row.replyOutPostDto = {
          chapterFlag: '1',
          replyLawContent: '',
          uploadFilePostDtoList: []
        }
        row.replyRelationPostDtoList = []
      } else {
        // if (row.relationQustionNo) {
        //   row.relationQustionNo = ''
        // }
        delete row.replyOutPostDto
        delete row.replyRelationPostDtoList
      }
    },
    // 查看相关履历
    viewMatterAnte (row) {
      this.relationHisForm = this.effectResultPostDTO
      // this.relationHisForm.keyId = row.handleInfoKeyId
      this.relationHisVisible = true
    },
    // 审核相关方意见
    assetClick (row) {
      //
    },
    // 选择关联问题
    selectSaCoPro (val, index, code) {
      // console.log(val, index, code)
      val.relationQustionNo = val.relationQuestionType === '0' ? val.commonQuestionNo : val.feedbackQustionNo
      let newVal = { relationQustionNo: val.relationQustionNo, relationQuestionType: val.relationQuestionType }
      if (code === 'LS') {
        // Object.assign(this.effectResultPostDTO.notImplementAssetInfoDto.questionList[Number(index)], val)
        Object.assign(this.effectResultPostDTO.notImplementAssetInfoDto.questionList[Number(index)], newVal)
        // console.log(this.effectResultPostDTO.notImplementAssetInfoDto.questionList[Number(index)])
      } else if (code === 'XGF') {
        // Object.assign(this.effectResultPostDTO.relationHandlingQuestionDtoList[Number(index)], val)
        Object.assign(this.effectResultPostDTO.relationHandlingQuestionDtoList[Number(index)], newVal)
      }
    },
    // 切换状态变化
    changeStatus (index) {
      if (!this.UtilJs.isEmpty(index)) {
        if (this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index]) {
          if ((this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].practicableResult === '1' && this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].replyOutPostDto.replyLawContent !== '' && this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].relationQustionFlag === '1')) {
            this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].implementeStatus = this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.yesImplemented
          } else {
            this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].implementeStatus = this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.noImplemented
          }
          if (this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].replyRelationPostDtoList && this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].replyRelationPostDtoList.length > 0) {
            this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].replyRelationPostDtoList.every(res => {
              if (res.practicableSuggestion !== '' && res.supplementNoFile !== '' && this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].relationQustionFlag === '1') {
                this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].implementeStatus = this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.yesImplemented
                return false
              } else {
                this.effectResultPostDTO.notImplementAssetInfoDto.questionList[index].implementeStatus = this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.noImplemented
                return false
              }
            })
          }
        }
      }
    },
    // 律所表格项切换row, column, event
    onMouseOver () {
      if (arguments[1] === 'LS') {
        this.code = 'LS'
      } else if (arguments[1] === 'XGF') {
        this.code = 'XGF'
      }
      if (this.implementVisible === true) {
        if (arguments[0][1].label === this.$i18n.messages[this.$i18n.locale].common.operate) {
          return
        }
      }
      if (arguments[0][1].label === this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.relationQustionFlag) {
        return
      }
      this.implementVisible = false
      this.changeStatus(this.effectResultPostDTO.rowChooseIndex)
      this.effectResultPostDTO.index = arguments[0][0].No - 1
    },
    // 行合并
    objectSpanMethod (item, { row, column, rowIndex, columnIndex }) {
      let spanCount = 1
      if ((columnIndex > 0 && columnIndex < 2) || columnIndex > 4) {
        if (rowIndex === 0 || item[rowIndex - 1].qusetionNumber !== row.qusetionNumber) {
          item.reduce((last, current) => {
            if (last.qusetionNumber === row.qusetionNumber && last.qusetionNumber === current.qusetionNumber) {
              last.checkboxFlag = '1'
              current.checkboxFlag = '1'
              spanCount++
            }
            return current
          })
          return {
            rowspan: spanCount,
            colspan: 1
          }
        }
        return {
          rowspan: 0,
          colspan: 0
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  @import '~@/styles/assetoutfeedback/common.scss'
</style>
