You need to sign in or sign up before continuing.
Smhinfp.vue 4.23 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
<template>
  <div class="eibs-tab">                   
        <c-col :span="24">                
       <c-col :span="6">
        <el-form-item label="报文类型" prop="infcon.smhcortyp">
            <c-select v-model="model.infcon.smhcortyp"  @change="querySmhDataInSmh" style="width:100%" :filterKey="['ERX','FMT','LET','RIM','SWT','TLX']"  dbCode="cortyp" placeholder="请选择报文类型">
              </c-select>
        </el-form-item>
       </c-col>    

                           
       <c-col :span="6">
        <el-form-item label="报文方向" prop="infcon.smhdir">
            <c-select v-model="model.infcon.smhdir"  @change="querySmhDataInSmh" style="width:100%" dbCode="smhdir"  placeholder="请选择报文方向">
              </c-select>
        </el-form-item>
       </c-col> 
    </c-col>
    <c-col :span="24">
       <c-col :span="8">
        <el-form-item label="创建时间" >
            <c-col :span="11">
                  <c-date-picker type="date"  @change="querySmhDataInSmh"  v-model="model.infcon.smhdatfrom" style="width:100%"  placeholder="请选择开始时间"></c-date-picker>
            </c-col>
             <c-col :span="2" style="text-align: center">
                  <label style="display: inline-block; width: 100%">-</label>
              </c-col>
            <c-col :span="11">
                <c-date-picker type="date"  @change="querySmhDataInSmh" v-model="model.infcon.smhdatto" style="width:100%"  placeholder="请选择结束时间"></c-date-picker>
            </c-col>
      </el-form-item>
       </c-col>
               

        <c-col :span="4">
          <c-checkbox  v-model="model.infcon.chktrn" @change="querySmhDataInSmh" true-label="X" false-label="">Active only</c-checkbox>
        </c-col>
    </c-col>

      <!-- <c-col :span="6" style="padding-left:100px">
          <c-button size="medium" type="primary" @click="querySmhDataInSmh">查询
            </c-button>
      </c-col> -->

       <c-col :span="24" >
          <el-table id='infgidSpTableRef'  :data="smhtableData"   :highlight-current-row="true" :border="true" style="width:100%" size="medium">          
            <el-table-column label="报文类型" prop="cortyp" align="left">
            <template slot-scope="scope">
               <span> {{getCodelabel(scope.row.cortyp,"cortyp") }}
              </span>
            </template>
            </el-table-column>
            <el-table-column label="报文描述" prop="nam" width="200px" align="left">
            </el-table-column>
            <el-table-column label="创建时间" prop="credattim" align="left">
            </el-table-column>
            <el-table-column label="报文方向" prop="dir" align="left">
            <template slot-scope="scope">
               <span> {{getCodelabel(scope.row.dir,"smhdir") }}
              </span>
            </template>
            </el-table-column>
             <el-table-column label="机构名称" prop="bchname" align="left"  width="240px" :show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column label="报文主键" prop="inr"  width="200px" align="left">
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="240px">
                <template slot-scope="scope">
                  	<c-button style="margin-left: 0" type='text' size="small" @click="showMsg(scope.row)">预览</c-button>
                </template>
            </el-table-column>
          </el-table>
        </c-col>
  
		<!-- 预览弹框 -->
		<message-view ref="msgView"></message-view>
  </div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import event from "../event"
import MessageView from "~/components/business/docpan/views/MessageView";

export default {
    inject: ['root'],
    props:["model","codes","smhtableData","objtyp"],
    mixins: [event],
    components: {MessageView},
    data(){
        return {

        }
    },
    methods:{
      getCodelabel(value,codenam) {
      const codeobj = this.model.dbCodes[codenam].find(obj => obj.value === value)
      return codeobj ? codeobj.label : value;
      }
    },
    mounted() {
    this.getdbCode('smhdir','CN','smhdir');
    this.getdbCode('cortyp','CN','cortyp');

      },
}
</script>
<style>

</style>