<template>
  <div class="eContainer">
    <c-function-btn
      :handleSubmit="handleSubmit"
      :handleCheck="handleCheck"
      :handleStash="handleStash"
    >
      <el-button size="small">备忘录</el-button>
      <el-button size="small">影像信息</el-button>
      <el-button size="small">保存模板</el-button>
      <el-button size="small">使用模板</el-button>
      <el-button size="small">制裁信息</el-button>
      <el-button size="small">拆分报文</el-button>
      <el-button size="small">智能提示</el-button>
    </c-function-btn>
    <el-form
      :model="model"
      :rules="rules"
      ref="modelForm"
      label-width="150px"
      label-position="right"
      size="small"
      :validate-on-rule-change="false"
    >
      <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
        <!--PD000001 -->
        <el-tab-pane label="amep" name="amep">
          <c-content>
            <m-amep :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>
        <!--PD000001 -->
        <el-tab-pane label="ovwp" name="ovwp">
          <m-ovwp :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000001 -->
        <el-tab-pane label="aamp" name="aamp">
          <m-aamp :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000042 -->
        <el-tab-pane label="ptyp" name="ptyp">
          <m-ptyp :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000077 -->
        <el-tab-pane label="detp" name="detp">
          <m-detp :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000328 -->
        <el-tab-pane label="dogpame" name="dogpame">
          <m-dogpame :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000324 -->
        <el-tab-pane label="dorpame" name="dorpame">
          <m-dorpame :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000332 -->
        <el-tab-pane label="adcpame" name="adcpame">
          <m-adcpame :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000169 -->
        <el-tab-pane label="lttinf" name="lttinf">
          <m-lttinf :model="model" :codes="codes" />
        </el-tab-pane>
      </c-tabs>
    </el-form>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Lttame from "~/model/Lttame";
import CommonProcess from "~/mixin/CommonProcess";
import CommonFuncs from "~/mixin/CommonFuncs";
import Check from "~/model/Lttame/Check";
import Default from "~/model/Lttame/Default";
import Pattern from "~/model/Lttame/Pattern";
import Ovwp from "./Ovwp";
import Amep from "./Amep";
import Aamp from "./Aamp";
import Ptyp from "./Ptyp";
import Detp from "./Detp";
import Dogpame from "./Dogpame";
import Dorpame from "./Dorpame";
import Adcpame from "./Adcpame";
import Lttinf from "./Lttinf";

export default {
  name: "Lttame",
  components: {
    "m-amep": Amep,
    "m-ovwp": Ovwp,
    "m-aamp": Aamp,
    "m-ptyp": Ptyp,
    "m-detp": Detp,
    "m-dogpame": Dogpame,
    "m-dorpame": Dorpame,
    "m-adcpame": Adcpame,
    "m-lttinf": Lttinf,
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [CommonProcess, CommonFuncs], // 里面包含了Default、Check等的公共处理
  data() {
    return {
      tabVal: "amep",
      trnName: "lttame",
      model: new Lttame().data,
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
      codes: { ...CodeTable },
    };
  },
  methods: {
    tabClick() {},
  },
  created: async function () {
    console.log("进入lttame交易");
    let rtnmsg = await this.init({});
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败！" });
    }
  },
};
</script>
<style>
</style>
