<template>
  <div id="intelligentDockingFinishDetail">
    <el-row>
      <el-col :span="24">
        <el-col :span="24">
          <topInfo :topTitle="topTitle" :display="display"></topInfo>
        </el-col>
        <el-col :span="24" class="main">
          <el-col :span="24">
            <detailTop @goBack="goBack"></detailTop>
          </el-col>
          <el-col :span="24">
            <intelligentDockingFinishDetails :form="form"></intelligentDockingFinishDetails>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import topInfo from '@/layout/common/topInfo.vue';
import detailTop from '@/layout/common/detailTop.vue';
import intelligentDockingFinishDetails from '@/layout/intelligentDocking/intelligentDockingFinishDetails.vue';
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
const { mapActions: intelligentDocking } = createNamespacedHelpers('intelligentDocking');
export default {
  name: 'intelligentDockingFinishDetail',
  props: {},
  components: {
    topInfo, //头部
    detailTop, //返回
    intelligentDockingFinishDetails, //详情
  },
  data: () => ({
    topTitle: '银企对接已关注详情',
    display: 'none',
    form: {
      company: {},
      dictionary: {},
      finance_claims: {},
      when: {},
      follow: {},
    },
  }),
  created() {
    this.searchInfo();
  },
  computed: {
    ...mapState(['user']),
    intelligentId() {
      return this.$route.query.intelligentId;
    },
  },
  methods: {
    ...intelligentDocking(['dockingSearch']),
    // 查询详情
    async searchInfo() {
      if (this.intelligentId) {
        const res = await this.dockingSearch({ id: this.intelligentId });
        for (const val of res.result) {
          this.$set(this, `form`, val);
        }
      }
    },
    // 返回
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  float: left;
  width: 100%;
  min-height: 780px;
  box-shadow: 0 0 5px #999;
  border-radius: 10px;
  padding: 20px;
}
</style>
