<template>
  <el-tabs v-model="activeName">
    <el-tab-pane class="pt10" label="五育评价" name="first"></el-tab-pane>
    <el-tab-pane class="pt10" label="维度设置" name="second">
      <div>
        <el-button type="primary">添加</el-button>
        <el-button type="danger">删除</el-button>
      </div>
      <el-table
        :data="firstTable"
        tooltip-effect="dark"
        class="mt20"
        style="width: 100%"
      >
        <el-table-column type="selection" align="center" width="55">
        </el-table-column>

        <el-table-column label="维度名称" prop="wdmc"> </el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button type="text" @click="">编辑 </el-button>
            <el-button type="text" @click="">评分项 </el-button>
          </template>
        </el-table-column>
      </el-table>
      <footer
        class="flex-item-none"
        style="display: flex; justify-content: flex-end; margin-top: 30px"
      >
        <el-pagination
          background
          layout="total,prev, pager, next"
          :page-size="limit"
          :total="total"
          :current-page.sync="cur_page"
          @current-change="handleCurrentChange"
        ></el-pagination>
      </footer>
    </el-tab-pane>
    <el-tab-pane class="pt10" label="学生二维码" name="third">
      <el-form :inline="true" :model="firstForm">
        <el-form-item class="mr10" label="年级：">
          <el-input v-model="firstForm.nj" placeholder="输入年级"></el-input>
        </el-form-item>
        <el-form-item class="mr10" label="班级：">
          <el-input v-model="firstForm.bj" placeholder="输入班级"></el-input>
        </el-form-item>
        <el-form-item class="mr10" label="学生姓名：">
          <el-input
            v-model="firstForm.xsxm"
            placeholder="输入学生姓名"
          ></el-input>
        </el-form-item>
        <el-form-item class="mr10" label="学籍号：">
          <el-input
            v-model="firstForm.xsxh"
            placeholder="输入学籍号"
          ></el-input>
        </el-form-item>
        <el-button type="primary">搜索</el-button>
      </el-form>
      <el-button type="primary">导出</el-button>
      <el-table
        :data="secondTable"
        tooltip-effect="dark"
        class="mt20"
        style="width: 100%"
      >
        <el-table-column type="selection" align="center" width="55">
        </el-table-column>

        <el-table-column label="年级" prop="nj" width="100"> </el-table-column>
        <el-table-column label="班级" prop="bj" width="100"> </el-table-column>
        <el-table-column label="学生姓名" prop="xsxm" width="100">
        </el-table-column>
        <el-table-column label="学籍号" prop="xsxh" align="center" width="150">
        </el-table-column>
        <el-table-column label="性别" prop="xb" width="100"> </el-table-column>
        <el-table-column label="二维码">
          <template slot-scope="scope">
            <h3 class="qr-code"></h3>
          </template>
        </el-table-column>
      </el-table>
      <footer
        class="flex-item-none"
        style="display: flex; justify-content: flex-end; margin-top: 30px"
      >
        <el-pagination
          background
          layout="total,prev, pager, next"
          :page-size="limit"
          :total="total"
          :current-page.sync="cur_page"
          @current-change="handleCurrentChange"
        ></el-pagination>
      </footer>
    </el-tab-pane>
    <el-tab-pane class="pt10" label="德育二维码" name="fourth">
      <el-form :inline="true" :model="firstForm">
        <el-form-item class="mr10" label="德育维度：">
          <el-select v-model="firstForm.dywd" placeholder="请选择维度">
            <el-option
              v-for="item in wdList"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item class="mr10" label="使用状态：">
          <el-select v-model="firstForm.syzt" placeholder="请选择状态">
            <el-option
              v-for="item in ztList"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item class="mr10" label="使用时间：">
          <el-date-picker
            style="width: 100%"
            v-model="firstForm.sj"
            type="date"
            placeholder="请选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item class="mr10" label="使用学生：">
          <el-input v-model="firstForm.syxs" placeholder="输入学生"></el-input>
        </el-form-item>
        <el-button type="primary">搜索</el-button>
      </el-form>
      <el-button type="primary">导出</el-button>
      <el-table
        :data="thirdTable"
        tooltip-effect="dark"
        class="mt20"
        style="width: 100%"
      >
        <el-table-column type="selection" align="center" width="55">
        </el-table-column>

        <el-table-column label="德育维度" prop="dywd" width="150">
        </el-table-column>
        <el-table-column label="使用状态" prop="syzt" width="100">
        </el-table-column>
        <el-table-column label="使用学生" prop="syxs" width="100">
        </el-table-column>
        <el-table-column
          label="使用时间"
          prop="sysj"
          align="center"
          width="150"
        >
        </el-table-column>
        <el-table-column label="二维码">
          <template slot-scope="scope">
            <h3 class="qr-code"></h3>
          </template>
        </el-table-column>
      </el-table>
      <footer
        class="flex-item-none"
        style="display: flex; justify-content: flex-end; margin-top: 30px"
      >
        <el-pagination
          background
          layout="total,prev, pager, next"
          :page-size="limit"
          :total="total"
          :current-page.sync="cur_page"
          @current-change="handleCurrentChange"
        ></el-pagination>
      </footer>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
export default {
  name: "index",
  data() {
    return {
      activeName: "second",
      limit: 10,
      total: 12,
      cur_page: 1,
      firstTable: [
        {
          id: "1",
          wdmc: "思想品德",
        },
        {
          id: "2",
          wdmc: "勤劳勇敢",
        },
        {
          id: "3",
          wdmc: "综合素质",
        },
        {
          id: "4",
          wdmc: "礼貌待人",
        },
        {
          id: "5",
          wdmc: "兴趣爱好",
        },
      ],
      firstForm: {
        nj: "",
        bj: "",
        xsxm: "",
        xsxh: "",
        dywd: "",
        syzt: "",
        sj: "",
        syxs: "",
      },

      wdList: [
        {
          label: "实践活动",
          value: "1",
        },
      ],
      ztList: [
        {
          label: "已使用",
          value: "1",
        },
        {
          label: "未使用",
          value: "2",
        },
      ],
    };
  },
  methods: {
    handleCurrentChange(val) {
      this.cur_page = val;
    },
  },
};
</script>

<style scoped lang="scss">
.qr-code {
  width: 28px;
  height: 28px;
  background: url("@/assets/images/a-2.png") center no-repeat;
  background-size: 28px 28px;
}
</style>