Forráskód Böngészése

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

lsc 1 éve
szülő
commit
d4032923dd

BIN
src/assets/icon/studentEva/diary.png


BIN
src/assets/icon/studentEva/img_1.png


BIN
src/assets/icon/studentEva/img_2.png


BIN
src/assets/icon/studentEva/img_3.png


BIN
src/assets/icon/studentEva/img_4.png


BIN
src/assets/icon/studentEva/img_5.png


BIN
src/assets/icon/studentEva/isDiary.png


BIN
src/assets/icon/studentEva/isReport.png


BIN
src/assets/icon/studentEva/isScore.png


BIN
src/assets/icon/studentEva/report.png


BIN
src/assets/icon/studentEva/score.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 477 - 181
src/components/pages/class.vue


+ 60 - 0
src/components/pages/kindStudentEva/index.vue

@@ -0,0 +1,60 @@
+<template>
+  <div class="tp_body">
+    <div class="tp_left">
+      <infoA :userid="suid" :oid="oid"></infoA>
+      <panelA :userid="suid" :oid="oid" :org="org"></panelA>
+    </div>
+    <div class="tp_right">
+      <testA :userid="suid" :oid="oid"></testA>
+    </div>
+  </div>
+</template>
+
+<script>
+import infoA from "./info/index.vue";
+import panelA from "./panel/index.vue";
+import testA from "./test/index.vue";
+
+export default {
+  components: {
+    infoA,
+    panelA,
+    testA,
+  },
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      cid: this.$route.query.cid,
+      suid: this.$route.query.suid,
+      role: this.$route.query.role,
+    };
+  },
+  methods: {},
+};
+</script>
+
+<style scoped>
+.tp_body {
+  width: 100%;
+  height: 100%;
+  min-height: 820px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 20px;
+  border-radius: 5px;
+  box-sizing: border-box;
+}
+
+.tp_left {
+  width: 230px;
+  height: 100%;
+}
+.tp_right {
+  width: calc(100% - 230px - 10px);
+  margin: 0 0 0 10px;
+  height: 100%;
+}
+</style>

+ 211 - 0
src/components/pages/kindStudentEva/info/index.vue

@@ -0,0 +1,211 @@
+<template>
+  <div class="i_body">
+    <div class="i_top">
+      <div class="img">
+        <img :src="info.headportrait ? info.headportrait : avator" alt="" />
+      </div>
+      <div class="name">
+        <span>{{ info.username }}</span>
+      </div>
+    </div>
+    <div class="i_bottom">
+      <div class="i_bottom_span">
+        <span>班级</span>
+        <el-tooltip
+          :content="info.cname ? info.cname : '暂无'"
+          placement="top"
+          effect="dark"
+        >
+          <span>{{ info.cname ? info.cname : "暂无" }}</span>
+        </el-tooltip>
+      </div>
+      <div class="i_bottom_span">
+        <span>备注</span>
+        <el-tooltip
+          :content="info.intro ? info.intro : '暂无'"
+          placement="top"
+          effect="dark"
+        >
+          <span>{{ info.intro ? info.intro : "暂无" }}</span>
+        </el-tooltip>
+      </div>
+      <div class="i_bottom_btn" @click="openInfo()">
+        <span class="edit"></span>
+        <span>编辑个人信息</span>
+      </div>
+    </div>
+    <infoDialog
+      :dialogVisibleInfo.sync="dialogVisibleInfo"
+      :userid="userid"
+      :oid="oid"
+    ></infoDialog>
+  </div>
+</template>
+
+<script>
+import avator from "../../../../assets/icon/test/teacher.jpg";
+import infoDialog from "./infoDialog/index.vue";
+export default {
+  components: {
+    infoDialog,
+  },
+  props: {
+    userid: {
+      type: String,
+    },
+    oid: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      avator: avator,
+      info: {},
+      dialogVisibleInfo: false,
+    };
+  },
+  watch: {
+    dialogVisibleInfo(newValue, oldValue) {
+      this.getData();
+    },
+  },
+  methods: {
+    getData() {
+      let params = {
+        uid: this.userid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSDetail", params)
+        .then((res) => {
+          this.info = res.data[0][0];
+          // 用于存储归类后的数据的对象
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    openInfo() {
+      this.dialogVisibleInfo = true;
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
+</script>
+
+<style scoped>
+.i_body {
+  width: 100%;
+  min-height: auto;
+  height: calc(40% - 10px);
+  background: #fff;
+  border-radius: 10px;
+  margin-bottom: 10px;
+  overflow: hidden;
+}
+
+.i_top {
+  height: 55%;
+  width: calc(100% - 20px);
+  margin: 0 auto;
+  display: flex;
+  flex-direction: column;
+  padding: 10px 0px 0px;
+  justify-content: center;
+  align-items: center;
+  box-sizing: border-box;
+  border-bottom: 1px solid #efefef;
+}
+
+.i_top > .img {
+  width: 80px;
+  height: 80px;
+  overflow: hidden;
+  border-radius: 50%;
+}
+
+.i_top > .img > img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+.i_top > .name {
+  width: 100%;
+  margin: 10px;
+  text-align: center;
+}
+
+.i_top > .name > span {
+  display: block;
+  max-width: 100%;
+  font-size: 22px;
+  font-weight: 700;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.i_bottom {
+  height: 45%;
+  width: calc(100% - 20px);
+  margin: 0 auto;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.i_bottom > .i_bottom_span {
+  width: 90%;
+  margin: 0 auto;
+  display: flex;
+  align-items: center;
+  font-size: 15px;
+}
+
+.i_bottom > .i_bottom_span + .i_bottom_span {
+  margin-top: 10px;
+}
+
+.i_bottom > .i_bottom_span > span:nth-child(1) {
+  width: 50px;
+  min-width: 50px;
+  text-align: right;
+  color: #a1a1a1;
+}
+
+.i_bottom > .i_bottom_span > span:nth-child(2) {
+  width: calc(100% - 30px);
+  overflow: hidden;
+  margin-left: 20px;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.i_bottom > .i_bottom_btn {
+  cursor: pointer;
+  border-radius: 5px;
+  border: 1px solid #dbdbdb;
+  box-sizing: border-box;
+  width: 90%;
+  background: rgb(252, 252, 252);
+  margin: 30px auto 0;
+  height: 35px;
+  font-weight: 600;
+  font-size: 12px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.i_bottom > .i_bottom_btn > .edit {
+  display: block;
+  width: 15px;
+  height: 15px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/test/edit-icon.png");
+  margin-right: 10px;
+}
+</style>

+ 418 - 0
src/components/pages/kindStudentEva/info/infoDialog/index.vue

@@ -0,0 +1,418 @@
+<template>
+  <el-dialog
+    title="编辑个人信息"
+    :visible.sync="dialogVisibleInfo"
+    :append-to-body="true"
+    width="500px"
+    :before-close="handleClose"
+    class="dialog_diy"
+  >
+    <div style="width: 100%; height: 100%">
+      <div class="info_box">
+        <div class="img" v-loading="imgLoading">
+          <img :src="info.headportrait ? info.headportrait : avator" alt="" />
+          <div class="mask" @click.stop="addImg($event)">
+            <img src="../../../../../assets/icon/test/camera_icon.png" alt="" />
+            <input
+              type="file"
+              accept="image/*"
+              capture="camera"
+              style="display: none"
+              @change="beforeUpload($event)"
+            />
+          </div>
+        </div>
+        <div class="info_span">
+          <span>姓名:</span>
+          <div>
+            <el-input
+              v-model="info.username"
+              placeholder="请输入姓名"
+            ></el-input>
+          </div>
+        </div>
+        <div class="info_span">
+          <span>班级</span>
+          <div>
+            <el-select
+              multiple
+              collapse-tags
+              v-model="info.teacherOffice"
+              placeholder="请选择教研室"
+              @change="Ochange"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="(item, index) in classJuri"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="info_span">
+          <span>备注:</span>
+          <div>
+            <!-- <el-input v-model="info.intro" placeholder="想说点什么..."></el-input> -->
+            <textarea
+              v-autoHeight="68"
+              rows="2"
+              class="binfo_input binfo_textarea"
+              cols
+              v-model="info.intro"
+              placeholder="想说点什么..."
+            ></textarea>
+          </div>
+        </div>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="confirm()">确 认</el-button>
+      <el-button @click="close()">关 闭</el-button>
+    </span>
+  </el-dialog>
+</template>
+  
+<script>
+import avator from "../../../../../assets/icon/test/teacher.jpg";
+export default {
+  props: {
+    dialogVisibleInfo: {
+      type: Boolean,
+      default: false,
+    },
+    userid: {
+      type: String,
+    },
+    oid: {
+      type: String,
+    },
+  },
+  watch: {
+    dialogVisibleInfo(newVal) {
+      if (newVal) {
+        this.getClass();
+        this.getData();
+      }
+    },
+  },
+  directives: {
+    autoHeight: {
+      update(el, binding) {
+        const { value } = binding;
+        if (value && typeof value === "number") {
+          el.style.height = `${value}px`;
+        } else {
+          el.style.height = "auto";
+        }
+      },
+      componentUpdated(el) {
+        el.style.height = `${el.scrollHeight + 5}px`;
+      },
+    },
+  },
+  data() {
+    return {
+      avator: avator,
+      info: {},
+      imgLoading: false,
+      classJuri: [],
+    };
+  },
+  methods: {
+    handleClose(done) {
+      this.close();
+      done();
+    },
+    close() {
+      this.$emit("update:dialogVisibleInfo", false);
+    },
+    confirm() {
+      if (!this.info.username) {
+        this.$message.error("姓名不能为空!");
+        return;
+      }
+      let params = [
+        {
+          userid: this.userid,
+          username: this.info.username,
+          classid: this.info.teacherOffice.join(","),
+          intro: this.info.intro,
+          h: this.info.headportrait ? this.info.headportrait : "",
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updateStudentInfoText", params)
+        .then((res) => {
+          this.$message.success("修改成功");
+          this.$emit("update:dialogVisibleInfo", false);
+        })
+        .catch((err) => {
+          this.$message.error("网络不佳");
+          console.error(err);
+        });
+    },
+    getData() {
+      let params = {
+        uid: this.userid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSDetail", params)
+        .then((res) => {
+          this.info = res.data[0][0];
+          this.info.teacherOffice = [];
+          this.info.teacherOffice = this.info.classid.split(",");
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    addImg(e) {
+      var el = e.currentTarget;
+      el.getElementsByTagName("input")[0].click();
+      e.target.value = "";
+    },
+    beforeUpload(event, type) {
+      // const loading = this.openLoading();
+      var file = event.target.files[0];
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+      var imgA = [
+        "png",
+        "jpg",
+        "jpeg",
+        "bmp",
+        "gif",
+        "webp",
+        "psd",
+        "svg",
+        "tiff",
+      ];
+      if (
+        imgA.indexOf(file.name.split(".")[file.name.split(".").length - 1]) ==
+        -1
+      ) {
+        this.$message.error("图片格式错误");
+        return;
+      }
+      this.imgLoading = true;
+      var _this = this;
+
+      if (file) {
+        var params = {
+          Key:
+            file.name.split(".")[0] +
+            new Date().getTime() +
+            "." +
+            file.name.split(".")[file.name.split(".").length - 1],
+          ContentType: file.type,
+          Body: file,
+          "Access-Control-Allow-Credentials": "*",
+          ACL: "public-read",
+        }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        var options = {
+          partSize: 2048 * 1024 * 1024,
+          queueSize: 2,
+          leavePartsOnError: true,
+        };
+        bucket
+          .upload(params, options)
+          .on("httpUploadProgress", function (evt) {
+            //这里可以写进度条
+            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+          })
+          .send(function (err, data) {
+            _this.imgLoading = false;
+            // loading.close();
+            if (err) {
+              _this.$message.error("上传失败");
+            } else {
+              _this.info.headportrait = data.Location;
+              _this.$forceUpdate();
+
+              console.log(_this.checkJson);
+              console.log(data.Location);
+            }
+          });
+      }
+    },
+    //获取班级列表
+    getClass() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectClassBySchool", params)
+        .then((res) => {
+          this.classJuri = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    Ochange() {
+      this.$forceUpdate();
+    },
+  },
+};
+</script>
+  
+<style scoped>
+.dialog_diy >>> .el-dialog {
+  /* height: 100%; */
+  margin: 10vh auto !important;
+}
+
+.dialog_diy >>> .el-dialog__header {
+  background: #454545 !important;
+  padding: 15px 20px;
+}
+
+.dialog_diy >>> .el-dialog__body {
+  height: calc(100% - 124px);
+  box-sizing: border-box;
+  padding: 0px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fafafa;
+}
+
+.info_box {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 30px 0;
+}
+
+.info_box > .img {
+  width: 80px;
+  height: 80px;
+  overflow: hidden;
+  border-radius: 50%;
+  position: relative;
+}
+
+.info_box > .img:hover > .mask {
+  display: flex;
+}
+
+.info_box > .img > .mask {
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.5);
+  /* display: flex; */
+  align-items: center;
+  justify-content: center;
+  display: none;
+}
+
+.info_box > .img > .mask > img {
+  width: 20px;
+}
+
+.info_box > .img > img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1px solid #c0c4cc;
+}
+
+.binfo_textarea {
+  border: 1px solid #c0c4cc;
+  font-size: 16px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: "Microsoft YaHei";
+  font-size: 14px;
+  color: #606266;
+}
+
+.binfo_input:focus-visible {
+  border: 1px solid #3681fc !important;
+}
+
+.binfo_textarea::-webkit-input-placeholder {
+  /* WebKit browsers */
+  color: rgb(192, 196, 204);
+}
+
+.binfo_textarea:-moz-placeholder {
+  /* Mozilla Firefox 4 to 18 */
+  color: rgb(192, 196, 204);
+}
+
+.binfo_textarea::-moz-placeholder {
+  /* Mozilla Firefox 19+ */
+  color: rgb(192, 196, 204);
+}
+
+.binfo_textarea:-ms-input-placeholder {
+  /* Internet Explorer 10+ */
+  color: rgb(192, 196, 204);
+}
+
+.info_span {
+  display: flex;
+  margin-top: 10px;
+}
+
+.info_span > span:nth-child(1) {
+  margin-top: 10px;
+  width: 100px;
+  text-align: right;
+}
+
+.info_span > div {
+  width: 250px;
+}
+</style>
+  

+ 289 - 0
src/components/pages/kindStudentEva/panel/index.vue

@@ -0,0 +1,289 @@
+<template>
+  <div class="i_body">
+    <div class="i_body_title">个人总览</div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div>
+          <span>{{ count }}</span
+          ><span>个</span>
+        </div>
+        <div>学习记录</div>
+      </div>
+    </div>
+    <div class="i_body_panel" v-for="(item,index) in typeList" :key="index">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div>
+          <span>{{ item.value }}</span
+          ><span>个</span>
+        </div>
+        <div>{{ item.name }}记录</div>
+      </div>
+    </div>
+    <!-- <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div>
+          <span>{{ count2 }}</span
+          ><span>个</span>
+        </div>
+        <div>语言记录</div>
+      </div>
+    </div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div>
+          <span>{{ count3 }}</span
+          ><span>个</span>
+        </div>
+        <div>社会记录</div>
+      </div>
+    </div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div>
+          <span>{{ count4 }}</span
+          ><span>个</span>
+        </div>
+        <div>科学记录</div>
+      </div>
+    </div>
+    <div class="i_body_panel">
+      <div class="i_icon"><span></span></div>
+      <div class="i_detail">
+        <div>
+          <span>{{ count5 }}</span
+          ><span>个</span>
+        </div>
+        <div>艺术记录</div>
+      </div>
+    </div> -->
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    userid: {
+      type: String,
+    },
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      test: [],
+      work: [],
+      count: 0,
+      // count1: 0,
+      // count2: 0,
+      // count3: 0,
+      // count4: 0,
+      // count5: 0,
+      typeList: [],
+    };
+  },
+  methods: {
+    getData() {
+      let params = {
+        uid: this.userid,
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSRecordY", params)
+        .then((res) => {
+          this.count = res.data[0].length; //总学习记录数量
+          var data = res.data[0]; //总学习记录
+          var type = res.data[1]; //分类
+          var tOid = res.data[2]; //学校分类
+          if (tOid.length > 0) {
+            for (var i = 0; i < tOid.length; i++) {
+              type.push(tOid[i]);
+            }
+          }
+          var typeList = [];
+          var ridList = "";
+          for (var i = 0; i < data.length; i++) {
+            if (typeList.length == 0) {
+              ridList = data[i].rid;
+              var a = data[i].type.split(",");
+              if (a.length > 1) {
+                for (var j = 0; j < a.length; j++) {
+                  typeList.push(a[j]);
+                }
+              } else {
+                typeList.push(a[j]);
+              }
+            } else {
+              if (ridList.indexOf(data[i].rid) == -1) {
+                ridList += "," + data[i].rid;
+                var a = data[i].type.split(",");
+                if (a.length > 1) {
+                  for (var j = 0; j < a.length; j++) {
+                    typeList.push(a[j]);
+                  }
+                } else {
+                  typeList.push(a[j]);
+                }
+              }
+            }
+          }
+          var ftype = [];
+          for (var i = 0; i < type.length; i++) {
+            for (var j = 0; j < typeList.length; j++) {
+              if (typeList[j] == type[i].id) {
+                ftype.push(type[i].pid);
+              }
+            }
+          }
+          var type1 = type.filter(item => item.pid === '0');;
+          var ftypeList = type1.map((item) => {
+            return {
+              id: item.id,
+              name: item.name,
+              value: ftype.filter((id) => id === item.id).length,
+            };
+          });
+          this.typeList = ftypeList;
+          // this.count1 = res.data[1][0].count; //健康学习记录
+          // this.count2 = res.data[2][0].count; //语言学习记录
+          // this.count3 = res.data[3][0].count; //社会学习记录
+          // this.count4 = res.data[4][0].count; //科学学习记录
+          // this.count5 = res.data[5][0].count; //艺术学习记录
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
+</script>
+
+<style scoped>
+.i_body {
+  width: 100%;
+  height: 60%;
+  min-height: 420px;
+  background: #fff;
+  border-radius: 10px;
+  margin-bottom: 10px;
+  overflow: hidden;
+}
+
+.i_body_title {
+  margin: 25px auto 15px;
+  font-size: 20px;
+  text-align: center;
+}
+.i_body_panel {
+  width: 90%;
+  display: flex;
+  align-items: center;
+  padding: 10px 15px;
+  box-sizing: border-box;
+  border-radius: 5px;
+  margin: 0 auto;
+  border: 1px solid #dbdbdb;
+  background: rgb(252, 252, 252);
+}
+.i_body_panel + .i_body_panel {
+  margin-top: 10px;
+}
+.i_body_panel > .i_icon {
+  width: 40px;
+  height: 40px;
+  border-radius: 8px;
+  display: flex;
+  align-items: center;
+  align-items: center;
+  justify-content: center;
+  margin-right: 10px;
+}
+.i_body_panel:nth-child(2) > .i_icon {
+  background: rgb(54, 129, 252);
+}
+.i_body_panel:nth-child(2) > .i_icon > span {
+  display: block;
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/img_1.png");
+}
+.i_body_panel:nth-child(3) > .i_icon {
+  background: rgb(23, 196, 105);
+}
+.i_body_panel:nth-child(3) > .i_icon > span {
+  display: block;
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/img_2.png");
+}
+.i_body_panel:nth-child(4) > .i_icon {
+  background: rgb(230, 127, 54);
+}
+.i_body_panel:nth-child(4) > .i_icon > span {
+  display: block;
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/img_3.png");
+}
+.i_body_panel:nth-child(5) > .i_icon {
+  background: rgb(54, 192, 230);
+}
+.i_body_panel:nth-child(5) > .i_icon > span {
+  display: block;
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/img_4.png");
+}
+.i_body_panel:nth-child(6) > .i_icon {
+  background: rgb(54, 192, 230);
+}
+.i_body_panel:nth-child(6) > .i_icon > span {
+  display: block;
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/img_5.png");
+}
+.i_body_panel:nth-child(7) > .i_icon {
+  background: rgb(54, 192, 230);
+}
+.i_body_panel:nth-child(7) > .i_icon > span {
+  display: block;
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/img_1.png");
+}
+.i_body_panel > .i_detail {
+  width: clac(100% - 50px);
+}
+.i_body_panel > .i_detail > div:nth-child(1) {
+  font-size: 12px;
+}
+
+.i_body_panel > .i_detail > div:nth-child(1) > span:nth-child(1) {
+  font-size: 18px;
+  font-weight: bold;
+  margin-right: 5px;
+}
+.i_body_panel > .i_detail > div:nth-child(2) {
+  color: #a1a1a1;
+  font-size: 12px;
+  margin-top: 0px;
+}
+</style>

+ 1 - 1
src/components/pages/studentEva/components/diary.vue → src/components/pages/kindStudentEva/test/diary.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>观察日记</div>
+  
 </template>
 
 <script>

+ 161 - 0
src/components/pages/kindStudentEva/test/index.vue

@@ -0,0 +1,161 @@
+<template>
+  <div class="i_body">
+    <div class="i_body_title">
+      <div class="title_box">
+        <div
+          @click="checkType(1)"
+          :class="{ active: type == 1 }"
+          class="title_item"
+        >
+          <div></div>
+          <div>观察日记</div>
+        </div>
+        <div
+          @click="checkType(2)"
+          :class="{ active: type == 2 }"
+          class="title_item"
+        >
+          <div></div>
+          <div>期末打分</div>
+        </div>
+        <div
+          @click="checkType(3)"
+          :class="{ active: type == 3 }"
+          class="title_item"
+        >
+          <div></div>
+          <div>期末打分</div>
+        </div>
+      </div>
+    </div>
+    <div class="i_body_contant">
+      <Diary v-if="type == 1" :oid="oid" :userid="userid"></Diary>
+      <Score v-if="type == 2" :oid="oid" :userid="userid"></Score>
+      <Report v-if="type == 3" :oid="oid" :userid="userid"></Report>
+    </div>
+  </div>
+</template>
+
+<script>
+import Diary from "./diary.vue";
+import Score from "./score.vue";
+import Report from "./report.vue";
+export default {
+  props: {
+    userid: {
+      type: String,
+    },
+    oid: {
+      type: String,
+    },
+  },
+  components: {
+    Diary,
+    Score,
+    Report,
+  },
+  data() {
+    return {
+      type: 1,
+    };
+  },
+  methods: {
+    checkType(type) {
+      this.type = type;
+    },
+  },
+  mounted() {},
+};
+</script>
+
+<style scoped>
+.i_body {
+  width: calc(100% - 20px);
+  height: calc(100% - 20px);
+  background: #fff;
+  border-radius: 10px;
+  margin-bottom: 10px;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  align-items: flex-start;
+  padding: 20px 10px 0 10px;
+}
+
+.i_body_title {
+  font-size: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-left: 20px;
+}
+.i_body_title > .title_box {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+.i_body_title > .title_box > .title_item {
+  cursor: pointer;
+  color: #666666;
+  background: #fff;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  justify-content: center;
+  align-items: center;
+  width: 150px;
+  height: 70px;
+  border-radius: 10px;
+}
+
+.i_body_title > .title_box > .title_item > div:last-child {
+  margin-left: 10px;
+}
+
+.i_body_title > .title_box > .title_item:nth-child(1) div:first-child,
+.i_body_title > .title_box > .active:nth-child(1) div:first-child {
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/diary.png");
+}
+.i_body_title > .title_box > .title_item:nth-child(2) div:first-child,
+.i_body_title > .title_box > .active:nth-child(2) div:first-child {
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/score.png");
+}
+.i_body_title > .title_box > .title_item:nth-child(3) div:first-child,
+.i_body_title > .title_box > .active:nth-child(3) div:first-child {
+  width: 20px;
+  height: 20px;
+  background-size: 100% 100%;
+  background-image: url("../../../../assets/icon/studentEva/report.png");
+}
+.i_body_title > .title_box > .active {
+  background: #f8fafe;
+}
+
+.i_body_title > .title_box > .active:nth-child(1) div:first-child {
+  background-image: url("../../../../assets/icon/studentEva/isDiary.png") !important;
+}
+.i_body_title > .title_box > .active:nth-child(2) div:first-child {
+  background-image: url("../../../../assets/icon/studentEva/isScore.png") !important;
+}
+.i_body_title > .title_box > .active:nth-child(3) div:first-child {
+  background-image: url("../../../../assets/icon/studentEva/isReport.png") !important;
+}
+.i_body_title > .title_box > .active > div:last-child {
+  color: #4288fc;
+}
+.i_body_contant {
+  margin: 0 auto;
+  width: calc(100% - 40px);
+  height: calc(100% - 90px);
+  background: #f8fafe;
+  border-radius: 10px;
+}
+</style>

+ 1 - 1
src/components/pages/studentEva/components/report.vue → src/components/pages/kindStudentEva/test/report.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>学情报告</div>
+  
 </template>
 
 <script>

+ 1 - 1
src/components/pages/studentEva/components/score.vue → src/components/pages/kindStudentEva/test/score.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>期末打分</div>
+  
 </template>
 
 <script>

+ 327 - 0
src/components/pages/studentEva.vue

@@ -0,0 +1,327 @@
+<template>
+  <div class="pb_content" style="background: unset">
+    <div
+      class="pb_content_body"
+      style="
+        background: #fff;
+        padding: 0px 25px;
+        box-sizing: border-box;
+        border-radius: 5px;
+      "
+    >
+      <div class="pb_head top">
+        <span>查看学生</span>
+        <div style="border-radius: 4px">
+          <el-button
+            type="primary"
+            class="bgColor student_button"
+            @click="
+              goTo(
+                '/class?userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org +
+                  '&role=' +
+                  role
+              )
+            "
+            >返回</el-button
+          >
+        </div>
+      </div>
+      <div class="student_head">
+        <div class="head_left">
+          <el-input
+            v-model="sName"
+            class="student_input"
+            placeholder="请输入用户名"
+          ></el-input>
+          <el-select
+            disabled
+            v-model="cid"
+            placeholder="请选择班级"
+            class="student_input"
+            @change="searchStudent"
+          >
+            <el-option
+              v-for="(c, cIndex) in classJuri"
+              :key="cIndex"
+              :label="c.name"
+              :value="c.id"
+            ></el-option>
+          </el-select>
+          <el-select
+            v-model="year"
+            placeholder="请选择学期"
+            class="student_input"
+            @change="searchStudent"
+          >
+            <el-option label="所有学期" value=""></el-option>
+            <el-option
+              v-for="(y, yIndex) in yearJuri"
+              :key="yIndex"
+              :label="y.name"
+              :value="y.id"
+            ></el-option>
+          </el-select>
+          <el-button
+            type="primary"
+            class="student_button"
+            @click="searchStudent"
+            >查询</el-button
+          >
+        </div>
+      </div>
+    </div>
+    <div class="pb_content_body">
+      <div class="student_table">
+        <el-table
+          ref="table"
+          :key="1"
+          :data="tableData"
+          border
+          :height="tableHeight"
+          :fit="true"
+          v-loading="isLoading"
+          style="width: 100%; height: 60%"
+          :header-cell-style="{ background: '#f1f1f1' }"
+          :row-class-name="tableRowClassName"
+        >
+          <el-table-column prop="name" label="姓名" align="center">
+          </el-table-column>
+          <el-table-column prop="accNumber" label="学生账号" align="center">
+          </el-table-column>
+          <el-table-column prop="rcount" label="观察记录总数" align="center">
+          </el-table-column>
+          <el-table-column label="综合评分" align="center">
+            <template slot-scope="{ row }">
+              <!-- {{ getGrade(row.pid) }} -->
+              {{ row.json ? row.json : "0" }}
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="400px">
+            <template slot-scope="scope">
+              <div class="classButtonBox">
+                <el-button
+                  class="de_button"
+                  type="primary"
+                  size="small"
+                  @click="
+                    goTo(
+                      '/kindStudentEva?userid=' +
+                        userid +
+                        '&oid=' +
+                        oid +
+                        '&org=' +
+                        org +
+                        '&cid=' +
+                        cid +
+                        '&suid=' + 
+                        scope.row.userid +
+                        '&role=' +
+                        role
+                    )
+                  "
+                  >查看评价</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="student_page">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total"
+          v-if="page"
+          @current-change="handleCurrentChange"
+        >
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      userid: this.$route.query.userid,
+      org: this.$route.query.org,
+      oid: this.$route.query.oid,
+      cid: this.$route.query.cid,
+      role: this.$route.query.role,
+      tableData: [],
+      sName: "",
+      year: "",
+      classJuri: [],
+      yearJuri: [],
+      page: 1,
+      total: 0,
+    };
+  },
+  methods: {
+    goTo(path) {
+      this.$router.push(path);
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    //获取班级列表
+    getClass() {
+      this.isLoading = true;
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectClassBySchool", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.classJuri = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    getYear() {
+      this.isLoading = true;
+      this.ajax
+        .get(this.$store.state.api + "selectTerm")
+        .then((res) => {
+          this.isLoading = false;
+          var yearJuri = res.data[0];
+          for (var i = 0; i < yearJuri.length; i++) {
+            if (yearJuri[i].defaultC == 1) {
+              this.year = yearJuri[i].id;
+            }
+          }
+          this.yearJuri = yearJuri;
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.searchStudent();
+    },
+    searchStudent() {
+      this.isLoading = true;
+      let params = {
+        cid: this.cid,
+        cu: this.sName,
+        cn: this.year,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectStudentAndRecord", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+  },
+  created() {
+    this.page = 1;
+    this.getClass();
+    this.getYear();
+    this.searchStudent();
+  },
+};
+</script>
+
+<style scoped>
+.pb_head {
+  margin: 0 !important;
+  width: 100% !important;
+}
+
+.top {
+  display: flex;
+  justify-content: space-between;
+}
+
+.bgColor {
+  background: #2167bc;
+}
+
+.student_button {
+  color: #fff;
+  background: #2268bc;
+  width: 60px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+
+.student_head >>> .el-button--primary {
+  background-color: #2268bc;
+}
+
+.student_head {
+  margin-top: 10px;
+  padding-bottom: 10px;
+  display: flex;
+  justify-content: space-between;
+}
+
+.head_left {
+  display: flex;
+  align-items: center;
+  line-height: 40px;
+}
+
+.student_input >>> .el-input__inner {
+  height: 30px;
+  width: 190px;
+  font-size: 13px;
+  padding: 0 10px;
+}
+.student_input.el-input {
+  width: auto;
+}
+
+.student_input {
+  margin-right: 10px;
+}
+
+.student_input >>> .el-input__icon {
+  line-height: unset;
+}
+
+.student_page {
+  margin-top: 10px;
+}
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1;
+}
+
+.student_table >>> .el-table--border td {
+  border-right: 0px !important;
+}
+
+.student_table >>> .el-table,
+.student_table >>> .el-table__body-wrapper {
+  height: auto !important;
+}
+</style>

+ 0 - 13
src/components/pages/studentEva/components/studentDetail.vue

@@ -1,13 +0,0 @@
-<template>
-  <div>学生全部信息页</div>
-</template>
-
-<script>
-export default {
-
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 13
src/components/pages/studentEva/components/studentMessage.vue

@@ -1,13 +0,0 @@
-<template>
-  <div>学生主页左侧信息页面</div>
-</template>
-
-<script>
-export default {
-
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 13
src/components/pages/studentEva/index.vue

@@ -1,13 +0,0 @@
-<template>
-  <div>学生评价</div>
-</template>
-
-<script>
-export default {
-
-}
-</script>
-
-<style>
-
-</style>

+ 9 - 1
src/router/index.js

@@ -114,7 +114,8 @@ import checkToTest from '@/components/pages/test/check'
 import checkToTest2 from '@/components/pages/test/check/index2.vue'
 import checkTest2 from '@/components/pages/test/check/check.vue'
 import courseIndex from '@/components/pages/course/index'
-import studentEva from '@/components/pages/studentEva/index'
+import studentEva from '@/components/pages/studentEva'
+import kindStudentEva from '@/components/pages/kindStudentEva/index'
 
 // 全局修改默认配置,点击空白处不能关闭弹窗
 ElementUI.Dialog.props.closeOnClickModal.default = false
@@ -985,6 +986,13 @@ export default new Router({
             meta: {
                 requireAuth: '' // 是否需要判断是否登录,这里是需要判断
             }
+        },
+        {
+            path: '/kindStudentEva',
+            component: kindStudentEva,
+            meta: {
+                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+            }
         }
     ]
 })

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott