index.vue 2.47 KB
Newer Older
1
<template>
huangxin committed
2
  <div class="eContainer-search">
3
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" label-position="right" size="small" :validate-on-rule-change="false">
“yanyuxin” committed
4 5 6 7 8 9 10 11 12 13 14 15
       <c-content>
        <m-infsea
          v-show="!showPanel"
          @updateShowPanel="updateShowPanel($event)"
          :model="model"
          :codes="codes"
          ref="infsea"/>
      </c-content>
       <c-button
               v-show="showPanel"
               style="margin-left: 75%; bottom: 10%; position: sticky"
               size="small"
16
               @click="goBack()">
“yanyuxin” committed
17 18 19
               <!-- @click="getDitSelInfo(scope.$index, scope.row)" -->
               返回
          </c-button>
20 21 22 23 24 25 26
    </el-form>
  </div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Inftrd from "~/model/Inftrd"
wangren committed
27
import commonProcess from "~/mixin/commonProcess"
28 29 30 31 32
import Check from "~/model/Inftrd/Check"
import Default from "~/model/Inftrd/Default"
import Pattern from "~/model/Inftrd/Pattern"
import Infsea from "./Infsea"

33

34
export default {
“yanyuxin” committed
35
    name: "Inftrd",
36 37 38 39 40 41 42 43
    components:{
        "m-infsea" : Infsea,
    },
    provide() {
        return {
            root: this
        }
    },
“yanyuxin” committed
44
    mixins: [commonProcess],    // 里面包含了Default、Check等的公共处理
45 46
    data(){
        return {
47
            tabVal: "infsea",
48
            trnName: "inftrd",
“yanyuxin” committed
49
            trnType: "",
50 51 52 53 54
            model: new Inftrd().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
55
            showPanel:false,
“yanyuxin” committed
56
            codes: {...CodeTable},
57 58 59
        }
    },
    methods:{
“yanyuxin” committed
60 61 62 63 64
        myTabClick(tab){
            this.tabClick(tab)
            /**
            *  do it yourself
            **/
65 66
        }
    },
“yanyuxin” committed
67 68
    initPanel(val) {
      if (val) {
69
        this.tabVal = "infsea";
“yanyuxin” committed
70 71 72 73 74 75 76 77 78 79 80 81
        //
      } else {
        this.tabVal = "";
      }
    },
      async updateShowPanel(value) {
      this.showPanel = value;
      this.initPanel(value);
    },
    goBack() {
      this.showPanel = false;
    },
82 83 84 85 86
    created:async function(){
        console.log("进入inftrd交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
“yanyuxin” committed
87
           this.updateModel(rtnmsg.data)
88 89 90 91 92 93 94 95 96 97 98 99 100
           //TODO 处理数据逻辑

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

</style>