<!--统筹人-律所/管理人tab子组件-->
<template>
  <div class="coordFeedBackSub">
      <el-row :gutter="10">
        <!--任务分配-->
        <el-col :lg="12" :md="24" :xl="8" class="el-col-margin">
          <el-card class="box-card card-header" shadow="never" body-style="height:105px;padding-top: 10px;padding-left: 10px;padding-bottom: 22.5px;">
              <div slot="header">
                <span class="iconfont iconcompanylist header-icon-color header-icon-font"/>
                <span class="header-title">{{$t('coordManageMain.taskAssign')}}</span>
                <btn-upload :btnDisplay="true"
                            :uploadName="$t('coordManageMain.importFeedback')"
                            type="primary"
                            class="header-btn1 card-btn"
                            btnSize="medium"
                            v-if="projectInfo.coordType==='1'"
                            fileType=".xls,.xlsx"
                            @uploadSuccess="uploadSuccess"
                            @uploadFailed="uploadFailed"
                            :uploadApi="uploadApi"></btn-upload>
                </div>
              <div>
                <span class="body-ul">{{$t('coordManageMain.allocated')}}</span>
                <div class="div-align">
                    <span class="num-large show-cursor" @click="showAssignment()" >{{coordFeedbackInfo.allocatedCount|numFormat}}</span>
                    <span class="num-text">{{$t('coordManageMain.count')}}</span>
                </div>
              </div>
          </el-card>
        </el-col>
        <!--资产复核-->
        <el-col :lg="12" :md="24" :xl="8" class="el-col-margin">
          <el-card class="box-card card-header" shadow="never" body-style="height:105px;padding-top: 10px;padding-left: 10px;">
              <div slot="header">
                  <span class="iconfont iconcompanylist header-icon-color header-icon-font"/>
                  <span class="header-title">{{$t('coordManageMain.assetReview')}}</span>
              </div>
              <div>
                <el-col :span="11">
                  <span class="body-ul">{{$t('coordManageMain.auditedReview')}}</span>
                      <div class="div-align">
                          <span class="num-large  show-cursor" @click="showOpnionReview()">{{coordFeedbackInfo.auditedReviewCount|numFormat}}</span>
                          <span class="num-text">{{$t('coordManageMain.count')}}</span>
                      </div>
                </el-col>
                <el-col :span="1">
                  <div class="body-devide-line"></div>
                </el-col>
                <el-col :span="12">
                  <span class="body-ul">{{$t('coordManageMain.feedbackReview')}}</span>
                      <div class="div-align">
                          <span class="num-large show-cursor" @click="showFeedbackReview()">{{coordFeedbackInfo.feedbackReviewCount|numFormat}}</span>
                          <span class="num-text">{{$t('coordManageMain.count')}}</span>
                      </div>
                </el-col>
              </div>
          </el-card>
        </el-col>
        <!--已分配任务-->
        <el-col :lg="12" :md="24" :xl="8" class="el-col-margin">
          <el-card class="box-card card-header" shadow="never" body-style="height:105px;padding-top: 10px;padding-left: 10px;">
              <div slot="header">
                  <span class="iconfont iconcompanylist header-icon-color header-icon-font"/>
                  <span class="header-title">{{$t('coordManageMain.assignedTask')}}</span>
              </div>
              <div>
                <el-col :span="11">
                      <span class="body-ul">{{$t('coordManageMain.implemente')}}</span>
                      <div class="div-align">
                          <span class="num-large show-cursor" @click="showFeedbackMain('1')">{{coordFeedbackInfo.implementeCount|numFormat}}</span>
                          <span class="num-text">{{$t('coordManageMain.count')}}</span>
                      </div>
                </el-col>
                <el-col :span="1">
                  <div class="body-devide-line"></div>
                </el-col>
                <el-col :span="12">
                      <span class="body-ul">{{$t('coordManageMain.disposal')}}</span>
                      <div class="div-align">
                          <span class="num-large show-cursor" @click="showFeedbackMain('3')">{{coordFeedbackInfo.disposalCount|numFormat}}</span>
                          <span class="num-text">{{$t('coordManageMain.count')}}</span>
                      </div>
                </el-col>
              </div>
          </el-card>
        </el-col>
        <!--进度跟踪-可抽查清单-->
        <el-col :lg="12" :md="24" :xl="8" class="el-col-margin">
          <el-card class="box-card card-header" shadow="never" body-style="height:210px;">
              <div slot="header" class="card-btn">
                  <span class="iconfont iconcompanylist header-icon-color header-icon-font"/>
                  <span class="header-title">{{$t('coordManageMain.checkListProgress')}}</span>
                  <auth-button type="primary" size="medium" :label="$t('coordManageMain.checkManage')" v-if="projectInfo.coordType==='1'" class="header-btn1 iconfont iconchouchaguanli" @click="toAbs"></auth-button>
                  <auth-button type="primary" size="medium" :label="$t('coordManageMain.view')" class="header-btn2 iconfont iconzuopintoupiao" @click="showAssetsStatus('1')" :style="projectInfo.coordType==='1' ? '' : 'margin-right: 0px'"></auth-button>
              </div>
              <div>
                  <ul class="body-ul">
                      <li>
                          <span>{{$t('coordManageMain.currentTotalCount')}}</span>
                          <span class="body-num-float">{{sampleCount.sumCount|numFormat}}</span>
                      </li>
                      <li class="body-li-margin">
                          <span>{{$t('coordManageMain.reviewedTotalCount')}}</span>
                          <span class="body-num-float">{{sampleCount.reviewedCount|numFormat}}</span>
                      </li>
                      <li class="body-li-margin">
                          <span>{{$t('coordManageMain.submittedTotalCount')}}</span>
                          <span class="body-num-float">{{sampleCount.submitCount|numFormat}}</span>
                      </li>
                      <li class="body-li-margin">
                          <span>{{$t('coordManageMain.newSubmittedTotalCount')}}</span>
                          <span class="body-num-float">{{sampleCount.newSubmitCount|numFormat}}</span>
                      </li>
                  </ul>
              </div>
          </el-card>
        </el-col>
        <!--进度跟踪-确权文件及保理商通知书进度-->
        <el-col :lg="16" :md="24" :xl="16" class="el-col-margin">
          <el-card body-style="height:210px" shadow="never" class="card-width1 card-header">
              <div slot="header" class="card-btn">
                  <span class="iconfont iconcompanylist header-icon-color header-icon-font"/>
                  <span class="header-title">{{$t('coordManageMain.filesProgress')}}</span>
                  <auth-button type="primary" size="medium" :label="$t('coordManageMain.view')" class="header-btn1 iconfont iconzuopintoupiao" @click="showAssetsStatus('2')"></auth-button>
              </div>
              <data-table :sourceData.sync="sourceData1"
                          class="table-margin"
                          :columns="columns1"
                          :showPage="false"
                          height="192px">
                  <template slot="auditFileType" slot-scope="scope">
                      {{formatType(scope.data.row)}}
                  </template>
                  <template slot="cz" slot-scope="scope">
                    <auth-button :title="$t('coordManageMain.sendData')" class="iconCircle marginLeft" v-if="projectInfo.coordType==='1'" icon="iconfont iconfasongziliao" @click="sendMaterial(scope.data.row)"></auth-button>
                  </template>
              </data-table>
          </el-card>
        </el-col>
        <!--进度跟踪-基础资产反馈进度-->
        <el-col :span="16" class="el-col-margin">
          <sample-track-schedule-sub :form="coordFeedbackInfo.sampleCountDTO" :trackParam="trackData" userType="1" :fileAll="fileAll"></sample-track-schedule-sub>
        </el-col>
        <!--进度跟踪-后补进度-->
        <el-col :span="8" class="el-col-margin">
          <file-back-track-schedule-sub :form="coordFeedbackInfo.afterCountDTO" :trackParam="trackData" userType="1" :fileAll="fileAll" trackType="1"></file-back-track-schedule-sub>
        </el-col>
        <!--进度跟踪-批量反馈进度-->
        <el-col :span="24" class="el-col-margin">
          <con-and-other-track-schedule-sub :form="coordFeedbackInfo.confirmAndOtherCounts" :trackParam="trackData" userType="1" :stampType="stampType" :fileAll="fileAll"></con-and-other-track-schedule-sub>
        </el-col>
        <!--通用问题管理-->
        <el-col :span="24" class="el-col-margin">
          <el-card body-style="height:250px" shadow="never" class="card-width1 card-header">
            <div slot="header" class="card-btn">
                <span class="iconfont iconcompanylist header-icon-color header-icon-font"/>
                <span class="header-title">{{$t('coordManageMain.commonProblemManage')}}</span>
                <auth-button type="primary" size="medium" :label="$t('coordManageMain.addCommonProblem')" v-if="projectInfo.coordType==='1'" class="header-btn1 iconfont iconxinzeng" @click="showManageCommonIssues()"></auth-button>
            </div>
            <div>
              <data-table :sourceData.sync="newCommonData"
                          class="table-margin1"
                          :columns="columns2"
                          :showPage="false"
                          height="192px">
                <template slot="commonQuestionContent" slot-scope="scope">
                  <span-plus :index="scope.data.$index" :text="scope.data.row.commonQuestionContent"></span-plus>
                </template>
                <el-table-column :label="$t('coordManageMain.operate')" align="center" width="200px" fixed="right">
                  <template slot-scope="scope">
                      <auth-button :title="$t('coordManageMain.history')" class="iconCircle marginLeft" icon="iconfont iconlvli" @click="showHistory(scope.row)"></auth-button>
                      <auth-button :title="$t('coordManageMain.change')" class="iconCircle marginLeft" v-if="projectInfo.coordType==='1'" icon="iconfont iconbianji" @click="showEdit(scope.row)"></auth-button>
                  </template>
                </el-table-column>
                <template slot="paginationLeft">
                  <div style="float: right">
                    <el-pagination  @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page.sync="queryParas.pageIndex"
                                    :page-sizes="pageSizes"
                                    :page-size="queryParas.pageSize"
                                    :layout="pageLayout"
                                    prev-text="上一页"
                                    next-text="下一页"
                                    :page-count="pageCount"
                                    ref="dataTable"
                                    :total="sourceData2.length">
                      <span style="text-align: center">{{queryParas.pageIndex}}</span>
                    </el-pagination>
                  </div>
                </template>
              </data-table>
            </div>
          </el-card>
        </el-col>
      </el-row>
      <!--任务分配-->
      <task-assign-pop v-if="taskAssignVisible"
                       :visible.sync="taskAssignVisible"
                       :form="{}"
                       :fileAll="fileAll"
                       :editModel="editModel"
                       :feedbackResource="feedbackResource"
                       @close="createQust"
                       :projectInfo="projectInfo"></task-assign-pop>
      <!--落实复核-->
      <deal-audit-review-pop v-if="auditReviewVisible"
                             :visible.sync="auditReviewVisible"
                             :form="trackData"
                             :projectInfoChange="projectInfoChange"
                             :stampType="stampType"
                             :editModel="editModel"
                             @createQust="createQust"
                             :dialogTitle="dialogTitle"
                             :reviewType="reviewType"></deal-audit-review-pop>
      <!--查看资产状态-->
      <asset-flow-status-pop v-if="assetVisible" :visible.sync="assetVisible" :fileType="assetsStatusType" :form="trackData" :stampType="stampType"></asset-flow-status-pop>
      <!--查看履历-->
      <deal-audit-review-his-pop :visible.sync="docHisVisible" v-if="docHisVisible" :editModel="editModel" :form="keyIdForm"></deal-audit-review-his-pop>
      <!-- <track-schedule-his-pop v-if="docHisVisible" :visible.sync="docHisVisible" :form="keyIdForm" :editModel="editModel"></track-schedule-his-pop> -->
      <!--修改-->
      <common-qust-mgr-pop v-if="editVisible" :visible.sync="editVisible" :form="trackData" @createQust="createQust" :commonInfo="commonInfo" :editModel="editModel"></common-qust-mgr-pop>
      <!--导入反馈-->
      <dialog-form  :isExport="true" :visible.sync="importVisible" :attr="{width:'500px'}" editModel="E" :form="exportAttrs" :autoSave="false"
                    :exportAttrs="{
                    total: 'total',
                    fail: 'errorMsgCount',
                    success: 'successMsgCount',
                    file: 'returnFileId',
                    ignore: 'failMsgCount'
                    }" ></dialog-form>
  </div>
</template>
<script>
import { authButton, DataTable, btnUpload, SpanPlus } from 'newepoch-components'
import sampleTrackScheduleSub from '@/components/element/assetoutfeedback/sampleTrackScheduleSub'
import coordManageApi from '@/api/assetoutfeedback/coordManage/coordManageApi'
import fileBackTrackScheduleSub from '@/components/element/assetoutfeedback/fileBackTrackScheduleSub'
import conAndOtherTrackScheduleSub from '@/components/element/assetoutfeedback/conAndOtherTrackScheduleSub'
import assetFlowStatusPop from '@/components/element/assetoutfeedback/assetFlowStatusPop'
import dealAuditReviewHisPop from '@/pages/assetoutfeedback/coordManage/dealAuditReviewHisPop'
import trackScheduleHisPop from '@/components/element/assetoutfeedback/trackScheduleHisPop'
import commonQustMgrPop from '@/components/element/assetoutfeedback/commonQustMgrPop'
import taskAssignPop from '@/pages/assetoutfeedback/coordManage/taskAssignPop'
import dealAuditReviewPop from '@/pages/assetoutfeedback/coordManage/dealAuditReviewPop'
import dialogForm from '@/components/element/assetoutfeedback/dialogForm'
import BasePage from '@/pages/basePage'
import { UPLOAD_API } from '@/constant'
import * as format from '@/filters/index'
export default {
  extends: new BasePage(),
  name: 'coordFeedBackSub',
  components: {
    authButton,
    DataTable,
    btnUpload,
    SpanPlus,
    sampleTrackScheduleSub,
    fileBackTrackScheduleSub,
    conAndOtherTrackScheduleSub,
    dealAuditReviewHisPop,
    assetFlowStatusPop,
    trackScheduleHisPop,
    commonQustMgrPop,
    taskAssignPop,
    dealAuditReviewPop,
    dialogForm
  },
  props: {
    projectInfo: {
      type: [Object],
      default: function () {
        return {}
      }
    },
    activeName: {
      type: [String],
      default: function () {
        return '0'
      }
    },
    fileAll: {
      type: [Array],
      default: function () {
        return []
      }
    }
  },
  data () {
    return {
      taskAssignVisible: false, // 任务分配弹窗
      auditReviewVisible: false, // 落实反馈意见复核弹窗
      assetVisible: false, // 资产流程状态弹窗
      docHisVisible: false, // 查看履历弹窗
      solveFlag: '0',
      editVisible: false, // 修改弹窗
      editModel: 'E',
      reviewType: '', // 1：落实意见复核，2：反馈意见复核
      dialogTitle: '', // 弹窗名
      importVisible: false,
      uploadApi: UPLOAD_API, // 文件上传
      exportAttrs: {},
      trackData: {},
      commonInfo: {},
      keyIdForm: {}, // 查看履历keyId
      stampType: '', // 电子章鲜章区分 1:电子章 2:鲜章
      pageCount: 0,
      pageSizes: [10, 20, 30, 40, 50],
      pageLayout: 'total, sizes, prev, pager, next, jumper',
      queryParas: {
        pageIndex: 1,
        pageSize: 10
      },
      columns1: [
        {
          // 分类
          prop: 'auditFileType',
          align: 'left',
          width: '200px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.classification
        },
        {
          // 本期总笔数
          prop: 'sumCount',
          align: 'center',
          width: '100px',
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.currentPeriodsTotal,
          format: (row) => {
            return this.numCountFormat(row.sumCount)
          }
        },
        {
          // 已完成审核笔数
          prop: 'reviewedCount',
          align: 'center',
          width: '150px',
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.completeCount,
          format: (row) => {
            return this.numCountFormat(row.reviewedCount)
          }
        },
        {
          // 已提交律所/管理人笔数
          prop: 'submitCount',
          align: 'center',
          width: '150px',
          label: this.activeName === '0' ? this.$t('coordManageMain.submittedLSCount') : this.$t('coordManageMain.submittedGLRCount'),
          format: (row) => {
            return this.numCountFormat(row.submitCount)
          }
        },
        {
          // 新增提交律所/管理人笔数
          prop: 'newSubmitCount',
          align: 'center',
          width: '200px',
          label: this.activeName === '0' ? this.$t('coordManageMain.newSubmittedTotalLSCount') : this.$t('coordManageMain.newSubmittedTotalGLRCount'),
          format: (row) => {
            return this.numCountFormat(row.newSubmitCount)
          }
        },
        {
          // 操作
          prop: 'cz',
          align: 'center',
          width: '80px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.operate
        }
      ],
      columns2: [
        {
          // 本期通用问题
          prop: 'commonQuestionContent',
          align: 'left',
          width: '150px',
          slot: true,
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.commonQuestionContent
        },
        {
          // 关联问题数
          prop: 'questionCount',
          align: 'center',
          width: '100px',
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.questionCount
        },
        {
          // 合规跟进人
          prop: 'traceUserName',
          align: 'left',
          width: '100px',
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.hgTraceUserName
        },
        {
          // 问题状态
          prop: 'questionStates',
          align: 'center',
          width: '150px',
          label: this.$i18n.messages[this.$i18n.locale].coordManageMain.questionStates,
          format: row => {
            return format.formatDict(row.questionStates, 'AUDIT_OUT_QUST_FEEDBACK_STATUS')
          }
        }
      ],
      sourceData1: [],
      sourceData2: [],
      coordFeedbackInfo: {}, // 产品反馈数据统计
      feedbackResource: '', // 反馈来源
      sampleCount: {}, // 可抽查清单
      assetsStatusType: ''
    }
  },
  watch: {
    activeName: function () {
      this.getFeedbackInfo()
    },
    projectInfo: function () {
      this.getFeedbackInfo()
    }
  },
  mounted () {
    this.handleFilter()
    this.getFeedbackInfo()
  },
  computed: {
    coordPageApi () {
      return coordManageApi.getCoordInfo
    },
    coordFeedbackApi () {
      return coordManageApi.coordFeedback
    },
    stampApi () {
      return coordManageApi.stampType
    },
    fileSendApi () {
      return coordManageApi.sendFile
    },
    projectInfoChange: {
      get () {
        return this.projectInfo
      }
    },
    newCommonData: {
      get () {
        return this.sourceData2.slice((this.queryParas.pageIndex - 1) * this.queryParas.pageSize, this.queryParas.pageIndex * this.queryParas.pageSize)
      },
      set () {

      }
    }
  },
  methods: {
    // 每页条数变更时
    handleSizeChange (val) {
      this.queryParas.pageSize = val
      this.queryParas.pageIndex = 1
    },
    // 当前页数改变时
    handleCurrentChange (val) {
      this.queryParas.pageIndex = val
    },
    // 文件类型格式化
    formatType (data) {
      let fileType = this.fileAll
      let auditFileType = fileType.filter(item => {
        return data.auditFileType === item.fileType
      })
      return auditFileType.length > 0 ? auditFileType[0].fileName : ''
    },
    // 产品反馈数据统计
    getFeedbackInfo () {
      if (this.projectInfo.projectId && this.projectInfo.periods) {
        this.getFeedbackResource()
        Object.assign(this.trackData, this.projectInfo)
        let param = {
          specialPlanPeriods: this.projectInfo.periods,
          projectId: this.projectInfo.projectId,
          participant: '60'
        }
        this.trackData.feedbackResource = this.feedbackResource
        this.coordPageApi.getDefaultInfo(this.trackData).then(res => {
          if (res.success) {
            this.coordFeedbackInfo = res.data
            this.sampleCount = this.coordFeedbackInfo.sampleCount ? this.coordFeedbackInfo.sampleCount : {}
            this.sourceData1 = this.coordFeedbackInfo.confirmCounts ? this.coordFeedbackInfo.confirmCounts : []
            this.sourceData2 = this.coordFeedbackInfo.commonQuestions ? this.coordFeedbackInfo.commonQuestions : []
            if (res.data.allocatedCount > 0 || res.data.auditedReviewCount > 0 || res.data.disposalCount > 0 || res.data.feedbackReviewCount > 0 || res.data.implementeCount > 0) {
              this.solveFlag = '1'
            } else {
              this.solveFlag = '0'
            }
            this.$emit('solveFlag', this.solveFlag)
          }
        })
        this.getStampType(param)
      } else {
        this.coordFeedbackInfo = []
        this.sampleCount = {}
        this.sourceData1 = []
        this.sourceData2 = []
      }
    },
    // 获取电子章鲜章
    getStampType (data) {
      this.stampApi.getStampInfo(data).then(res => {
        if (res.success) {
          if (res.data.length > 0) {
            this.stampType = res.data[0].stampWay
          } else {
            this.stampType = ''
          }
        } else {
          this.error()
        }
      })
    },
    // 反馈来源
    getFeedbackResource () {
      if (this.activeName === '0') { // 律所反馈
        this.feedbackResource = '1'
      } else if (this.activeName === '1') { // 管理反馈
        this.feedbackResource = '2'
      }
    },
    // 任务分配
    showAssignment () {
      if (this.projectInfo.coordType === '1') {
        this.editModel = 'E'
        this.taskAssignVisible = true
      } else {
        this.warning(this.$t('coordManageMain.noAuth'))
      }
    },
    // 落实意见复核
    showOpnionReview () {
      if (this.projectInfo.coordType === '1') {
        this.editModel = 'E'
        this.reviewType = '1'
        this.dialogTitle = this.$t('coordManageMain.auditedReview')
        this.auditReviewVisible = true
      } else {
        this.warning(this.$t('coordManageMain.noAuth'))
      }
    },
    // 反馈意见复核
    showFeedbackReview () {
      if (this.projectInfo.coordType === '1') {
        this.editModel = 'E'
        this.reviewType = '2'
        this.dialogTitle = this.$t('coordManageMain.feedbackReview')
        this.auditReviewVisible = true
      } else {
        this.warning(this.$t('coordManageMain.noAuth'))
      }
    },
    // 待落实处理
    showFeedbackMain (type) {
      if (this.projectInfo.coordType === '1') {
        this.$router.push({ path: '/assetoutfeedback/effectDealFeedBack/effectDealFeedBackMain',
          query: { 'projectId': this.projectInfo.projectId, 'periods': this.projectInfo.periods, 'feedbackStatus': type, 'displayFlag': true } })
      } else {
        this.warning(this.$t('coordManageMain.noAuth'))
      }
    },
    // 查看资产流程状态
    showAssetsStatus (type) {
      this.assetsStatusType = type // 文件类型
      if (type === '2') {
        this.stampType = '3'
        this.assetsStatusType = '4'
      }
      this.assetVisible = true
    },
    // 抽查管理
    toAbs () {
      this.$router.push({ path: '/assetoutfeedback/sampleMgrMain/sampleMgrMain', query: this.projectInfo })
    },
    createQust (data) {
      if (data) {
        this.handleFilter()
        this.getFeedbackInfo()
      }
    },
    sendMaterial (row) {
      let form = {
        auditFileType: row.auditFileType,
        periods: this.projectInfo.periods,
        projectId: this.projectInfo.projectId,
        projectName: this.projectInfo.projectName
      }
      // 有新增未发送律所资产
      if (row.assetInfoIds && row.assetInfoIds.length > 0) {
        form.assetInfoIds = row.assetInfoIds
        this.assetpkgmgrFullScreenLoading()
        this.fileSendApi.postQuery(form).then(res => {
          this.assetpkgmgrFullScreenLoading().close()
          if (res.success && res.data) {
            this.success(this.$t('coordManageMain.sendSuccess'))
            this.getFeedbackInfo()
          } else {
            this.error(this.$t('coordManageMain.sendFail'))
          }
        }).catch(res => this.assetpkgmgrFullScreenLoading().close())
      // 没有新增未发送律所资产
      } else {
        this.warning(this.$t('coordManageMain.noAddPrompty'))
      }
    },
    // 新建通用问题
    showManageCommonIssues () {
      this.editModel = 'C'
      this.editVisible = true
    },
    // 查看履历弹窗
    showHistory (data) {
      this.editModel = 'V'
      this.keyIdForm = {
        commonQuestionNo: data.commonQuestionNo,
        projectId: this.projectInfo.projectId,
        periods: this.projectInfo.periods,
        type: '1'// 通用问题履历
      }
      this.docHisVisible = true
    },
    // 上传成功
    uploadSuccess (returnData, rowData, fileList) {
      let paramData = {
        fileId: returnData.fileID
      }
      this.coordFeedbackApi.postDefaultImport(paramData).then(res => {
        if (res.success) {
          this.success(this.$t('common.uploadSuccess'))
          this.exportAttrs = res.data
          this.importVisible = true
        } else {
          this.warning(this.$t('common.uploadError'))
        }
      })
    },
    // 上传失败
    uploadFailed () {
      this.warning(this.$t('common.uploadError'))
    },
    // 修改
    showEdit (data) {
      this.editModel = 'E'
      this.commonInfo = data
      this.editVisible = true
    },
    numCountFormat (data) {
      data = data || '0'
      return data + this.$t('coordManageMain.count')
    }
  },
  filters: {
    numFormat (data) {
      if (!data) {
        return '0'
      } else {
        return data
      }
    }
  }
}
</script>
<style lang="scss" scoped>
@import '~@/styles/assetoutfeedback/common.scss'
</style>
