index.vue 5.78 KB
<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="68px" inline>
      <el-form-item label="菜单名称" size="small">
        <el-input v-model="form.name" placeholder="请输入菜单名称"></el-input>
      </el-form-item>
      <el-form-item label="状态" size="small">
        <el-select v-model="form.region" placeholder="菜单状态">
          <el-option label="正常" value="1"></el-option>
          <el-option label="停用" value="0"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item size="small">
        <el-button size="small" type="primary" icon="el-icon-search" @click="onSubmit">搜索</el-button>
        <el-button size="small" icon="el-icon-refresh">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="5" class="mb8">
      <el-col :span="1.5">
        <el-button size="small" type="primary" icon="el-icon-plus">新增</el-button>
      </el-col>
      <div class="top-right-btn">
        <el-row>
          <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top">
            <el-button icon="el-icon-search" circle></el-button>
          </el-tooltip>
          <el-tooltip class="item" effect="dark" content="刷新" placement="top">
            <el-button icon="el-icon-refresh" circle></el-button>
          </el-tooltip>
        </el-row>
      </div>
    </el-row>
    <el-table
    :data="tableData"
  :header-cell-style="{background:'#F8F8F9',color:'#515A6E'}"
    style="width: 100%;"
    row-key="id"
    :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
    <el-table-column
      prop="date"
      label="菜单名称"
     >
    </el-table-column>
    <el-table-column
      prop="name"
      label="图标"
       header-align="center" align="center">
    </el-table-column>
    <el-table-column
      prop="address"
      label="排序" header-align="center" align="center">
    </el-table-column>
    <el-table-column
      prop="address"
      label="权限标识">
    </el-table-column>
    <el-table-column
      prop="address"
      label="组件路径">
    </el-table-column>
    <el-table-column
      prop="address"
      label="状态" header-align="center" align="center">
    </el-table-column>
    <el-table-column
      prop="address"
      label="创建时间"
      header-align="center" align="center"
      >
    </el-table-column>
    <el-table-column
      prop="address"
      label="操作" header-align="center" align="center">
    </el-table-column>
    </el-table>
    <div class="pagination-container">
          <el-pagination
            background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[10, 20, 30, 40, 50]"
            :page-size="100"
            layout="total, sizes, prev, pager, next, jumper"
            :total="100"
          ></el-pagination>
        </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: {},
      tableData: [{
          id: 1,
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
           children: [{
              id: 11,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               children: [{
                id: 111,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               }]
            }, {
              id: 12,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               children: [{
                 id: 121,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               }]
          }]
        }, {
          id: 2,
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄',
           children: [{
              id: 21,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               children: [{
                id: 211,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               }]
            }, {
              id: 22,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               children: [{
                 id: 221,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               }]
          }]
        }, {
          id: 3,
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄',
          children: [{
              id: 31,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               children: [{
                id: 311,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               }]
            }, {
              id: 32,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               children: [{
                 id: 321,
              date: '2016-05-01',
              name: '王小虎',
              address: '上海市普陀区金沙江路 1519 弄',
               }]
          }]
        }],
    };
  },
};
</script>
<style lang="scss">
</style>