<template>
  <div>
    <CurdPanel ref="curdPanelRef"
               title-data-table="SQL列表"
               :doQuery="LogsSqlDataApi.doQuery"
               :searchParam="{seid: seuuid}"
               :queryFormLabelPosition="'top'"
               :allowAdd="false"
               :allowEdit="false"
               :allowDelete="false"
               :allowRefresh="false"
               :titleSearchForm="false"
               fullHeight
               autoLoad>

      <!-- 表格列区域 -->
      <template slot="table-columns">
        <el-table-column type="expand">
          <template slot-scope="scope">
            <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: pre-wrap;white-space: -o-pre-wrap; word-wrap: break-word;">{{scope.row.sesql}}</pre>
          </template>
        </el-table-column>
        <el-table-column prop="optime" label="操作时间" :formatter="formatterDateTime" show-overflow-tooltip></el-table-column>
        <el-table-column prop="sesqlelap" label="执行时间（毫秒）" show-overflow-tooltip></el-table-column>
      </template>

    </CurdPanel>
  </div>
</template>
<script>
  import BaseApi from '@/api/base/BaseApi';

  export default {
    props: {
      seuuid: String
    },
    data() {
      return {
        LogsSqlDataApi: BaseApi('/logs/LogsSqlData'),
      };
    },
    watch: {},
    methods: {
      // showInfo(sql) {
      //     this.editor.sql = "";
      //     LogsServAPI.SqlFormat(sql).then(resp => {
      //         this.editor.sql = resp.dataInfo;
      //         this.editor.show = true;
      //     });
      // }
    }
  };
</script>
