<template>
  <el-row>
    <el-col :span="6" style="border-right: 1px solid #000; padding-right: 20px">
      <!-- 顶部工具栏 -->
      <el-form :model="headerFormData" label-width="auto">
        <el-form-item label="数据资源名称">
          <el-input
            v-model="headerFormData.datasetName"
            placeholder="请输入"
          ></el-input>
        </el-form-item>
        <el-form-item label="节点IP">
          <el-input
            v-model="headerFormData.dataType"
            placeholder="请输入"
          ></el-input>
        </el-form-item>
     
        <el-form-item>
          <el-button type="primary" @click="onSearch">查询</el-button>
          <el-button type="default" @click="onReset">重置</el-button>
        </el-form-item>
      </el-form>
      <!-- 左侧表格 -->

      <el-table
        :data="leftTableData"
        border
        max-height="500"
        style="width: 100%; margin-right: 10px"
      >
        <el-table-column label="序号" type="index" width="50"></el-table-column>
        <el-table-column prop="name" label="数据资源名称"></el-table-column>
        <el-table-column
          prop="name"
          label="节点IP"
        ></el-table-column>
        <el-table-column label="操作" width="120">
          <template slot-scope="scope">
            <el-button
              type="text"
              @click="onEyeClick(scope.row)"
              icon="el-icon-view"
            ></el-button>
            <el-button
              type="text"
              @click="onEyeClick(scope.row)"
              icon="el-icon-delete"
            ></el-button>
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页 -->
      <div class="pagination-container">
        <el-pagination
          background
          layout="prev, pager, next"
          :current-page="pagination.currentPage"
          :page-size="pagination.pageSize"
          :total="pagination.total"
          @current-change="onPageChange"
        ></el-pagination>
      </div>
    </el-col>
    <el-col :span="18" style="padding-left: 20px">
      <!-- 右侧表格 -->
      <div>六统一接入方式为sftp,必填此表</div>
      <div
        style="
          width: 100%;
          display: flex;
          justify-content: end;
          align-items: center;
        "
      >
        <el-button type="primary">新增</el-button>
        <el-button type="primary">修改</el-button>
        <el-button type="primary">删除</el-button>
        <el-button type="primary">上传</el-button>
        <el-button type="primary">模版下载</el-button>
      </div>
      <el-table
        ref="rightTable"
        :data="rightTableData"
        border
        style="width: 100%"
        :expand-row-keys="expandedRows"
        @expand-change="onExpandChange"
        :show-header="false"
        max-height="800"
      >
        <!-- 序号列 -->
        <el-table-column label="序号" type="index" width="50"></el-table-column>

        <!-- 普通列 -->
        <el-table-column prop="name" label="数据资源名称">
          <template slot-scope="scope">
            <div style="display: flex; align-items: center">
              <div>数据资源名称</div>
              <el-input
                style="width: 260px; margin-left: 20px"
                v-model="scope.rowinput"
                placeholder="请输入内容"
              ></el-input>
            </div>
          </template>
        </el-table-column>
 <el-table-column prop="name" label="文件名称">
          <template slot-scope="scope">
            <div style="display: flex; align-items: center">
              <div>文件名称</div>
              <el-input
                style="width: 260px; margin-left: 20px"
                v-model="scope.rowinput"
                placeholder="请输入内容"
              ></el-input>
            </div>
          </template>
        </el-table-column>

        <!-- 展开行 -->
        <el-table-column type="expand">
          <template slot-scope="props">
            <div class="expanded-content">
              <el-form
                :model="apiFormData"
                label-width="auto"
                inline
                class="form-detail-inline"
                :label-position="right"
              >
         
                <el-form-item label="应用场景">
                  <el-input
                    v-model="apiFormData.dataType"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                <el-form-item label="文件类型">
                  <el-input
                    v-model="apiFormData.datasetName"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                <el-form-item label="六统一SFTP IP">
                  <el-input
                    v-model="apiFormData.dataType"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                <el-form-item label="六统一SFTP 端口">
                  <el-input
                    v-model="apiFormData.dataType"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>

                <el-form-item label="文件夹路径">
                  <el-input
                    v-model="apiFormData.datasetName"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                <el-form-item label="acks">
                  <el-input
                    v-model="apiFormData.dataType"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
               

                <el-form-item label="六统一用户名">
                  <el-input
                    v-model="apiFormData.datasetName"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                <el-form-item label="六统一密码">
                  <el-input
                    v-model="apiFormData.dataType"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
                 <el-form-item label="文件大小">
                  <el-input
                    v-model="apiFormData.dataType"
                    placeholder="请输入"
                  ></el-input>
                </el-form-item>
              </el-form>
            </div>
          </template>
        </el-table-column>
      </el-table>
    </el-col>
  </el-row>
</template>
<script>
import MyForm from "@/components/MyForm";
export default {
  name: "",
  components: {
    MyForm,
  },
  data() {
    return {
      pagination: {
        currentPage: 1,
        pageSize: 10,
        total: 161,
      },
      leftTableData: [{}],
      rightTableData: [{}],
      headerFormData: {},
      apiFormData: {},
      expandedRows: [],
    };
  },
  methods: {},
  created() {},
  mounted() {},
};
</script>
<style lang="scss" scoped>
.expanded-content{
  padding: 20px;
  box-sizing: border-box;
}
.textarea-form-block{
  margin-top: 20px;
}
.title {
  width: 100%;
  text-align: left;
}
.table_title {
  width: 100%;
  text-align: left;
  margin: 10px 0;
}

.textarea-form{
  margin-top: 20px;
}


</style>
