<template>
  <div class="am-main-view d-flex flex-column px-4">
    <!--打印时的标题-->
    <div class="d-flex justify-content-center align-content-center">
      <span ref="printTitle" class="d-none text-h1-dhcc text-bold-dhcc">{{ subject }}</span>
    </div>
    <!--申请信息-->
    <div class="am-app-info">
      <div class="d-flex align-items-center pt-4 pb-2">
        <title-text>申请信息</title-text>
      </div>
      <router-view name="formUrl" ref="formUrl" />
      <router-view name="busUrl" ref="busUrl" />
    </div>
    <!--事务处理-->
    <div class="am-handler" v-if="isShowHandler" :hidden="isHiddenHandler">
      <div class="d-flex align-items-center py-2">
        <title-text>事务处理</title-text>
      </div>
      <approval-opinion-input ref="approvalOpinionInput" @listChange="listChange" />
    </div>
    <!--审批路径-->
    <div class="am-app-path">
      <approval-path ref="approvalPath" />
    </div>
  </div>
</template>

<script lang="ts">
import Vue from "vue";
import Component from "vue-class-component";
import TitleText from "@/views/TitleText.vue";
import ApprovalPath from "@/components/approval-process/ApprovalPath.vue";
import ApprovalOpinionInput from "@/components/approval-process/ApprovalOpinionInput.vue";
import { Emit, Prop } from "vue-property-decorator";
/**
 * @Description: 审批附件库页面
 * @author LiuBo
 * @date 2021/1/27
 * @time 14:35
 */
@Component({
  name: "ApprovalInfo",
  components: { ApprovalOpinionInput, ApprovalPath, TitleText }
})
export default class ApprovalInfo extends Vue {
  isShowHandler = true; // 是否显示业务处理
  isHiddenHandler = false; // 是否显示业务处理
  @Prop() subject: any; // 标题
  mounted(): void {}

  /**
   * @Description: 文件数组改变事件
   * @author GuoXuHui
   * @date 2021-04-08
   * @time 14:58
   */
  @Emit("listChange")
  listChange(listData: any[]) {
    return listData;
  }
}
</script>
<style scoped lang="scss"></style>
