<template>
  <div style="display: flex">
    <div style="flex: 2">
      <span class="effectoutfontStyle">{{this.value}}</span>
    </div>
    <div style="flex: 1">
      <auth-button type="primary" icon="iconfont iconycxiazai" :size="'medium'" :label="$t('coordManageMain.dataDownload')" @click="showPop('3')"></auth-button>
    </div>
    <effectBatchPop v-if="effectBatchVisible"
                      :visible.sync="effectBatchVisible"
                      :editModel="newEditModel"
                      :form="form"
                      :assetInfoId="form.assetInfoId"
                      :popTitle="popTitle"
                      :keyIdArray="keyIdArray"
                      ref="effectBatchPop"
                      :effApi="effApi"></effectBatchPop>
  </div>
</template>

<script>
import effectBatchPop from '@/pages/assetoutfeedback/effectDealFeedBack/effectBatchPop'
import { authButton } from 'newepoch-components'
import effectDealFeedBackApi from '@/api/assetoutfeedback/effectDealFeedBack/effectDealFeedBackApi'
export default {
  components: { authButton, effectBatchPop },
  props: {
    // v-model绑定的数据
    value: {
      type: [String, Number],
      default: function () {
        return null
      }
    },
    form: {
      type: Object,
      default: function () {
        return {}
      }
    }
  },
  data () {
    return {
      effectBatchVisible: false // 基础信息，资料下载弹窗
    }
  },
  computed: {
    SingleImApi () {
      return effectDealFeedBackApi.getBatchInfo
    }
  },
  methods: {
    // 基础信息资料下载
    showPop (type) {
      this.popTitle = this.$i18n.messages[this.$i18n.locale].effectDealFeedBackMain.singleImplement
      this.keyIdArray = [{ keyId: this.form.keyId }]
      this.newEditModel = 'I'
      this.effectBatchVisible = true
      this.effApi = this.SingleImApi
      this.$nextTick(() => {
        this.$refs.effectBatchPop.tabNumChange(type)
      })
    }
  }
}
</script>

<style>

</style>
