<template>
  <div class="eContainer">
    <c-page title="">
    <el-form
      :model="model"
      :rules="rules"
      ref="modelForm"
      label-width="200px"
      size="small"
      :validate-on-rule-change="false"
    >
      <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
        <!--PD000054 -->
        <el-tab-pane label="Task Manager" name="tskmgr">
          <m-tskmgr :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000069 -->
        <el-tab-pane label="Services" name="srvdsp">
          <m-srvdsp :model="model" :codes="codes" />
        </el-tab-pane>

        <!--PD000069 -->
        <el-tab-pane label="Predecessors" name="config1">
          <m-predecessors :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="SWIFT发送" name="config2">
          <m-swt :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="TC发送" name="config3">
          <m-tco :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="检查ACK" name="config4">
          <m-pda :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="Finalize Order" name="config5">
          <m-finalize :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="return to Zhongtai" name="config6">
          <m-rtz :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="Pending CIPACK" name="config7">
          <m-cipack :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="GPI" name="config8">
          <m-gpi :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="衍生品额度释放" name="config9">
          <m-srvlmd :model="model" :codes="codes" />
        </el-tab-pane>

        <el-tab-pane label="衍生品额度业务信息同步" name="config10">
          <m-srvlme :model="model" :codes="codes" />
        </el-tab-pane>

        <!-- <el-tab-pane label="ELCACK" name="config11">
          <m-config :model="model" :codes="codes" />
        </el-tab-pane> -->

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

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

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

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

        <!--PD000049 -->
        <!-- <el-tab-pane label="PD000049" name="prtswtr">
                <m-prtswtr :model="model" :codes="codes"/>
           </el-tab-pane> -->
      </c-tabs>
    </el-form>
    </c-page>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Mgrtsk from "~/model/Mgrtsk";
import commonProcess from "~/mixin/commonProcess";
import Check from "~/model/Mgrtsk/Check";
import Default from "~/model/Mgrtsk/Default";
import Pattern from "~/model/Mgrtsk/Pattern";

import Tskmgr from "./Tskmgr";
import Srvdsp from "./Srvdsp";
import Cipack from "./Cipack";
import Finalize from "./Finalize";
import Gpi from "./Gpi";
import Pda from "./Pda";
import Predecessors from "./Predecessors";
import Rtz from "./Rtz";
import Srvlmd from "./Srvlmd";
import Srvlme from "./Srvlme";
import Swt from "./Swt";
import Tco from "./Tco";

export default {
    name: 'Mgrtsk',
    components:{
        "m-tskmgr" : Tskmgr,
        "m-srvdsp" : Srvdsp,
        "m-cipack" : Cipack,
        "m-finalize" : Finalize,
        "m-gpi" : Gpi,
        "m-pda" : Pda,
        "m-predecessors" : Predecessors,
        "m-rtz" : Rtz,
        "m-srvlmd" : Srvlmd,
        "m-srvlme" : Srvlme,
        "m-swt" : Swt,
        "m-tco" : Tco,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "tskmgr",
            trnName: "mgrtsk",
            model: new Mgrtsk().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {...CodeTable},
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入mgrtsk交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
           //TODO 处理数据逻辑
           this.updateModel(rtnmsg.data)
        }
        else
        {
            this.$notify.error({title: '错误',message: '服务请求失败！'});
        }
  },
};
</script>
<style>
</style>
