<template>
    <div class="eibs-tab">
      <c-col :span="12">
        <el-form-item label="来往信件"> </el-form-item>
      </c-col>
  
      <c-col :span="22" >
        <c-istream-table-docpan :list="stmData.data" :columns="stmData.columns">
          <el-table-column label="报文格式">
            <template slot-scope="scope">
              <c-select
                v-model="model.trnmod.trndoc.doceot[scope.row.index].cortyp"
                style="width: 100%"
                disabled
                placeholder="请选择"
              >
                <el-option
                  v-for="item in codes.doceotCortyp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </template>
          </el-table-column>
          <el-table-column label="报文格式">
            <template slot-scope="scope">
              <c-select
                v-model="model.trnmod.trndoc.doceot[scope.row.index].docsnf"
                style="width: 100%"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in codes.docsnf"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </template>
          </el-table-column>
          <el-table-column label="语言" width="150%">
            <template slot-scope="scope">
              <c-select
                v-model="model.trnmod.trndoc.doceot[scope.row.index].docuil"
                style="width: 100%"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in codes.uiltxt"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </template>
          </el-table-column>
          <el-table-column label="传送方式">
            <template slot-scope="scope">
              <c-select
                v-model="model.trnmod.trndoc.doceot[scope.row.index].apf"
                disabled
                style="width: 100%"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in codes.apftxt"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </template>
          </el-table-column>
          <el-table-column label="Or." width="65%">
            <template slot-scope="scope">
              <c-input
                v-model="model.trnmod.trndoc.doceot[scope.row.index].apfcpy1"
                :readonly="true"
                style="width: 100%"
                placeholder="请选择"
              >
              </c-input>
            </template>
          </el-table-column>
          <el-table-column label="CC" width="65%">
            <template slot-scope="scope">
              <c-input
                v-model="model.trnmod.trndoc.doceot[scope.row.index].apfcpy2"
                style="width: 100%"
                placeholder="请选择"
              >
              </c-input>
            </template>
          </el-table-column>
          <el-table-column label="">
            <template slot-scope="scope">
              <c-select
                v-model="model.trnmod.trndoc.doceot[scope.row.index].staflg"
                style="width: 100%"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in codes.swttlx"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </template>
          </el-table-column>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button
                size="mini"
                :disabled="
                  model.trnmod.trndoc.doceot[scope.row.index].pandsc == 'MT799' &&
                  model.didgrp.rec.elcflg == 'Y'
                "
                @click="handleDisplay(scope.row.index, scope.row)"
                >显示</el-button
              >
              <el-button
                size="mini"
                type="danger"
                @click="handleDetail(scope.row.index, scope.row)"
                >明细</el-button
              >
            </template>
          </el-table-column>
        </c-istream-table-docpan>
      </c-col>
    </div>
  </template>
  <script>
  import Api from "~/service/Api";
  import CommonProcess from "~/mixin/CommonProcess";
  import CodeTable from "~/config/CodeTable";
  import Event from "~/model/Cltset/Event";
  
  export default {
    inject: ['root'],
    props: ["model", "codes"],
    mixins: [CommonProcess],
    data() {
      return {
        stmData: {
                  columns: [
                      //注释的已改成静态
                      "role 收报人",
                      "pandsc 描述",
                      //"cortyp 类型",
                      //"docsnf 报文格式",
                      //"docuil 语言",
                      //"apf 传送方式"
                  ],
                  data: [],
        }
      };
    },
    methods: {...Event},
    created: function () {},
  };
  </script>
  <style>
  </style>
  