<template>
  <div class="saga-project">
    <div class="header">
      <el-input placeholder="输入项目名称进行搜索" v-model="value" class="search">
        <i slot="suffix" class="el-input__icon el-icon-search"></i>
      </el-input>
      <span style="margin-left: 20px">
          所属集团：
      <el-select v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>
      </span>

      <el-button class="button" @click="lookExamine" type="text">查看审核记录</el-button>
    </div>
    <div class="content">
      <el-table :data="tableData" stripe style="width: 100%;" :header-cell-style="{background:'#eef1f6'}">
        <el-table-column prop="date" label="所属集团" align="center"/>
        <el-table-column prop="name" label="项目名称" align="center"/>
        <el-table-column prop="name" label="项目id" align="center"/>
        <el-table-column prop="name" label="使用的集团方案" align="center"/>
        <el-table-column prop="name" label="待审核的申请" align="center"/>
        <el-table-column label="操作" align="center">
          <template slot-scope="scope">
            <el-button @click="handleRelation(scope.$index,scope.row) " type="text">管理项目字典</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>


  </div>
</template>

<script>

  export default {
    name: "project",
    components: {},
    data() {
      return {
        value: '',
        options: [],
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
        }, {
          date: '2016-05-04',
          name: '王小虎',
        }, {
          date: '2016-05-01',
          name: '王小虎',
        }, {
          date: '2016-05-03',
          name: '王小虎',
        }]
      }
    },
    methods: {
      lookExamine() {
        this.$router.push({
          path: 'project/auditRecord',
        })
      },
      handleRelation(index, row) {
        this.$router.push({
          path: 'group/contentManagement',
          query: {add: 'no'}
        })
      }
    }
  }
</script>

<style scoped lang="scss">
  .saga-project {
    background: #ffffff;
    border: 1px solid #eee;

    .header {
      margin: 20px;
      overflow: hidden;

      .search {
        float: left;
        width: 20%;
      }

      .button {
        float: right;
      }
    }

    .content {
      margin-top: 20px;

      .cursor {
        cursor: pointer;
      }
    }
  }
</style>
