<template>
  <div style="width: 94%; margin: 0 auto 10px">
    <div class="student_head">
      <div class="student_search">
        <div>数据筛选</div>
        <el-select v-model="mChoose">
          <el-option label="全部" value="">全部</el-option>
          <el-option
            v-for="(c, cIndex) in messageJuri"
            :key="cIndex"
            :value="c.id"
            :label="c.name"
          ></el-option>
        </el-select>
        <div
          style="
            line-height: 35px;
            font-size: 14px;
            min-width: 60px;
            margin-left: 10px;
          "
        >
          分类筛选
        </div>
        <el-select v-model="tChoose">
          <el-option label="全部" value="">全部</el-option>
          <el-option
            v-for="(e, eIndex) in typeJuri"
            :key="eIndex"
            :value="e.id"
            :label="e.title"
          ></el-option>
        </el-select>
      </div>
      <div class="student_search_right">
        <el-input v-model="mName" placeholder="请输入名称"></el-input>
        <el-button size="mini" type="primary">查询</el-button>
      </div>
    </div>
    <div class="pb_content_body">
      <!-- <div class="modelBoxLeft">
        <div
          v-for="(item, index) in modelType"
          :key="index"
          class="modelChooseList"
        >
          <div>{{ item.name }}</div>
          <div class="modelChildBox">
            <div
              v-for="(item1, index1) in item.modelCType"
              :key="index1"
              class="modelChild"
            >
              {{ item1.cname }}
            </div>
          </div>
        </div>
      </div> -->
      <div class="modelBoxRight" v-for="(item, index) in table" :key="index">
        <div class="modelTop">
          <div class="modelImg">
            <img src="../../../../assets/icon/modelImg.png" alt="" />
          </div>
          <div>{{ item.name }}</div>
        </div>
        <div class="modelBottom" @click="isGoWhere(item.id)">查看</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      messageJuri: [],
      typeJuri: [],
      //   modelType: [
      //     {
      //       id: 1,
      //       name: "课堂学习",
      //       modelCType: [
      //         { cid: 1, cname: "登录时长" },
      //         { cid: 1, cname: "学习时长" },
      //         { cid: 1, cname: "资料阅读率" },
      //         { cid: 1, cname: "资料阅读时长" },
      //       ],
      //     },
      //     {
      //       id: 2,
      //       name: "工具使用",
      //       modelCType: [
      //         { cid: 1, cname: "工具提交率" },
      //         { cid: 1, cname: "工具使用（类型）" },
      //         { cid: 1, cname: "工具提交次数" },
      //       ],
      //     },
      //     {
      //       id: 3,
      //       name: "课程得分",
      //       modelCType: [
      //         { cid: 1, cname: "主观题平均得分" },
      //         { cid: 1, cname: "客观题平均得分" },
      //         { cid: 1, cname: "课程平均得分" },
      //       ],
      //     },
      //     {
      //       id: 4,
      //       name: "同伴交互",
      //       modelCType: [
      //         { cid: 1, cname: "分组工具使用数量" },
      //         { cid: 1, cname: "参与评论次数" },
      //         { cid: 1, cname: "获得评论次数" },
      //         { cid: 1, cname: "点赞他人次数" },
      //         { cid: 1, cname: "回复评论次数" },
      //         { cid: 1, cname: "获得点赞次数" },
      //       ],
      //     },
      //   ],
      table: [
        { id: 1, name: "课堂互动模型" },
        { id: 2, name: "学习互动分析" },
      ],
      mChoose: "",
      tChoose: "",
      mName: "",
    };
  },
  methods: {
    goTo(path) {
      this.$router.push(path);
    },
    isGoWhere(id) {
      if (id == 1) {
        this.goTo(
          "/lookModel??userid=2e7428aa-a5c9-11ed-b13d-005056b86db5&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=null&classid=f6b9d2a5-a5c8-11ed-b13d-005056b86db5,6a09cc92-bf38-11ed-8d51-005056b86db5,01bb15bb-d519-11ed-b81c-005056b86db5"
        );
      } else {
        window.parent.postMessage(
          {
            tools: "AIAnalyse",
          },
          "*"
        );
      }
    },
  },
};
</script>

<style scoped>
.student_head {
  padding: 10px 25px;
  display: flex;
  justify-content: space-between;
  background: #fff;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}
.student_search {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.student_search > div:nth-child(1) {
  line-height: 35px;
  font-size: 14px;
  min-width: 60px;
}
.student_search > div:nth-child(4) {
  cursor: pointer;
}
.student_search >>> .el-input__inner {
  width: 190px;
  height: 35px;
  margin-left: 10px;
}
.student_search_right {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}
.student_search_right >>> .el-button {
  margin-left: 5px;
  height: 35px;
  width: 80px;
  font-size: 14px;
  background: #2268bd;
}
.pb_content_body {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 20px auto;
  justify-content: flex-start;
}
.modelBoxLeft {
  height: 100%;
  background: #fff;
  border-radius: 5px;
}
.modelBoxLeft {
  width: 20%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  padding: 20px;
}
.modelChooseList {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  margin-bottom: 20px;
}
.modelChooseList > div:nth-child(1) {
  margin-bottom: 15px;
  color: #6e6e6e;
}
.modelChildBox {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}
.modelChild {
  background: #f7f7f7;
  border-radius: 15px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  color: #b7b7b7;
  min-width: 85px;
  margin: 0 5px 10px 0;
  padding: 0 10px;
}
.modelChild:hover {
  background: #eeeeee;
}
.modelBoxRight {
  background: #fff;
  width: 350px;
  height: 280px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  border-radius: 5px;
  margin: 0 20px 20px 0;
}
.modelTop {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
}
.modelImg {
  width: 150px;
  height: 150px;
  padding: 25px 0;
}
.modelImg > img {
  width: 100%;
  height: 100%;
}
.modelBottom {
  margin: 20px 0 0 0;
  width: 100%;
  text-align: center;
  background: #f4f4f4;
  height: 30px;
  line-height: 30px;
  padding: 5px 0;
  cursor: pointer;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}
</style>