<template>
  <div class="eContainer">
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="100px" size="small">
       <c-tabs v-model="activeName" ref="elment" type="card" @tab-click="tabClick">
        
            <!--PD000001 -->
           <el-tab-pane label="PD000001" name="menu">
                <m-menu :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 Office from "~/model/Office"
import CommonProcess from "~/mixin/CommonProcess"
import Pattern from "~/model/Office/Pattern"
import Menu from "./Menu"


export default {
    components:{
        "m-menu" : Menu,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [CommonProcess],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            activeName: "menu",
            model:new Office().data,
            // defaultRule:Default,
            // rules:this.mergeRules(Pattern,Check),
            rules:Pattern,
            codes:{
            },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入office交易");
        let rtnmsg = await Api.post("office/init",{params:{}})
        if(rtnmsg.retcod == SUCCESS)
        {
           //TODO 处理数据逻辑

        }
        else
        {
            this.$notify.error({title: '错误',message: '服务请求失败！'});
        }
    }
}
</script>
<style>

</style>
