lsc 2 年之前
父節點
當前提交
7341f91bea

+ 1 - 1
dist/index.html

@@ -18,4 +18,4 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.e8cff7d4b599ccebfb554d97540a3c19.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.22ce41e1fce64bc5d1cf.js></script><script type=text/javascript src=./static/js/app.08ecd42bd49fca52143e.js></script></body></html><script>document.domain = "cocorobo.cn"</script>
+    }</style><link href=./static/css/app.3841137351298e2dada584808de60648.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.22ce41e1fce64bc5d1cf.js></script><script type=text/javascript src=./static/js/app.32dfd4c9eaa4b35c78dd.js></script></body></html><script>document.domain = "cocorobo.cn"</script>

文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.3841137351298e2dada584808de60648.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.3841137351298e2dada584808de60648.css.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.e8cff7d4b599ccebfb554d97540a3c19.css.map


二進制
dist/static/img/isVideo.0c95409.png


二進制
dist/static/img/isWord.9585033.png


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.08ecd42bd49fca52143e.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.08ecd42bd49fca52143e.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.32dfd4c9eaa4b35c78dd.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.32dfd4c9eaa4b35c78dd.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 234 - 0
src/components/components/answerData2.vue

@@ -0,0 +1,234 @@
+<template>
+  <div class="data_body">
+    <div class="title">
+      <span>答对数量</span>
+    </div>
+    <div style="width: 100%; height: 400px">
+      <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
+      <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; margin: 0 0 0 1rem"></div>
+    </div>
+    <div class="c_box">
+      <div class="correct">
+        <span>答题人数<span>{{ people.length + "人" }}</span></span>
+      </div>
+      <div class="correct">
+        <span>全部答对人数为<span>{{
+        count+'人'
+        }}</span></span>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["problemJson", "answer", "people"],
+  data() {
+    return {
+      Aa: "",
+      count: 0,
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        sdata: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "item",
+          formatter: "第{b0}题: 答对{c0}人",
+        },
+        grid: {
+          left: "1%",
+          bottom: "10%",
+          top: "15%",
+          containLabel: true,
+        },
+        yAxis: {
+          type: "value",
+          boundaryGap: [0, 1],
+          minInterval: 1,
+          axisLine: {
+            onZero: false,
+          },
+        },
+        xAxis: {
+          type: "category",
+          data: [],
+          axisLabel: {
+            textStyle: {
+              color: "#000",
+            },
+          },
+        },
+
+        series: [
+          {
+            type: "bar",
+            data: [],
+            showBackground: true,
+            barWidth: "50px",
+            label: {
+              show: true,
+              position: "top",
+              color: "#2e2e2e",
+            },
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.xAxis.data = option.xdata;
+        this.option.series[0].data = option.sdata;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+  },
+  watch: {
+    problemJson(val) {
+      this.ooption = {
+        xdata: [],
+        sdata: [],
+      };
+      for (var i = 0; i < this.problemJson.length; i++) {
+        this.ooption.xdata.push(i + 1);
+        this.ooption.sdata.push(0);
+      }
+      let count = 0;
+      for (var i = 0; i < this.people.length; i++) {
+        let el = this.people[i].works.split(",");
+        let count2 = 0;
+        for (var j = 0; j < this.problemJson.length; j++) {
+          if (this.problemJson[j] == el[j]) {
+            this.ooption.sdata[j]++;
+            count2++;
+          }
+        }
+        if (count2 == this.problemJson.length) {
+          count++;
+        }
+      }
+      this.count = count;
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.yAxis.data = this.ooption.xdata;
+        this.option.series[0].data = this.ooption.sdata;
+        this.chartObj.setOption(this.option);
+      }
+      this.$forceUpdate();
+    },
+  },
+  mounted() {
+    this.ooption = {
+      xdata: [],
+      sdata: [],
+    };
+    for (var i = 0; i < this.problemJson.length; i++) {
+      this.ooption.xdata.push(i + 1);
+      this.ooption.sdata.push(0);
+    }
+    let count = 0;
+    for (var i = 0; i < this.people.length; i++) {
+      let el = this.people[i].works.split(",");
+      let count2 = 0;
+      for (var j = 0; j < this.problemJson.length; j++) {
+        if (this.problemJson[j] == el[j]) {
+          this.ooption.sdata[j]++;
+          count2++;
+        }
+      }
+      if (count2 == this.problemJson.length) {
+        count++;
+      }
+    }
+    this.count = count;
+    this.setChart(this.ooption);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 500px;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 10px auto;
+  box-sizing: border-box;
+  padding: 10px;
+  width: 95%;
+  background: #fff;
+}
+
+.data_body .title {
+  /* position: absolute;
+  top: 20px;
+  left: 20px; */
+}
+
+.tips {
+  display: flex;
+  align-items: flex-start;
+  width: 100%;
+  background: #eee;
+  padding: 6px 6px;
+  box-sizing: border-box;
+  border-radius: 5px;
+  color: #171717;
+}
+
+.tips img {
+  margin-right: 5px;
+}
+
+.tips span span {
+  color: #077aff;
+  margin: 0 3px;
+}
+
+.c_box {
+  margin-top: 10px;
+  display: flex;
+}
+
+.correct+.correct {
+  margin-left: 10px;
+}
+
+.correct {
+  display: flex;
+  align-items: flex-start;
+  width: fit-content;
+  background: #eee;
+  padding: 6px 6px;
+  box-sizing: border-box;
+  border-radius: 5px;
+  color: #171717;
+}
+
+.correct span span {
+  color: #077aff;
+  margin: 0 3px;
+}
+</style>

+ 15 - 7
src/components/study.vue

@@ -1273,6 +1273,11 @@
                           {{ s.student }}
                         </div>
                       </div>
+                      <AnswerData2 v-if="
+                        worksStudent.length &&
+                        worksStudent[jdIndex][rwIndex][toolIndex].length > 0
+                      " :problemJson="tool.selectJson.answer" :people="worksStudent[jdIndex][rwIndex][toolIndex]">
+                      </AnswerData2>
                     </div>
                   </div>
                   <!-- <div class="upload_toolBtn" @click="addImg($event)">
@@ -1934,8 +1939,8 @@
               </div>
             </div>
             <div class="upAnswerCss">
-                <el-button type="primary" @click="addSelectAnswer" v-if="!isSelect">提交答案</el-button>
-              </div>
+              <el-button type="primary" @click="addSelectAnswer" v-if="!isSelect">提交答案</el-button>
+            </div>
           </div>
         </div>
       </div>
@@ -1947,13 +1952,14 @@
 import "../common/aws-sdk-2.235.1.min.js";
 import pdf from "./components/pdf3";
 import AskStatic from "./components/askStatic";
+import AnswerData2 from "./components/answerData2";
 import EditorBar from "./tools/wangEnduit.vue";
 import Time from "./tools/time.vue";
 import Mind from "./tools/jsmind.vue";
 import Sunburst from "./tools/sunburst";
 import SeeBoard from "./tools/seeBoard";
 export default {
-  components: { EditorBar, Time, pdf, AskStatic, Mind, Sunburst, SeeBoard },
+  components: { EditorBar, Time, pdf, AskStatic, Mind, Sunburst, SeeBoard, AnswerData2 },
   data() {
     return {
       dialogVisible: false,
@@ -2008,7 +2014,7 @@ export default {
       ],
       mr: require("../assets/vedioPic.png"),
       word: require("../assets/icon/isWord.png"),
-      video:require("../assets/icon/isVideo.png"),
+      video: require("../assets/icon/isVideo.png"),
       noLikes: require("../assets/icon/comment/noLikes.png"),
       likes: require("../assets/icon/comment/likes.png"),
       courseDetail: {},
@@ -4362,7 +4368,7 @@ export default {
     width: 50px !important;
   }
 
-  .dialog_diy3 >>> .el-dialog{
+  .dialog_diy3>>>.el-dialog {
     width: 95% !important;
   }
 
@@ -4381,6 +4387,7 @@ export default {
     width: 550px !important;
   }
 }
+
 .dialog_diy>>>.el-dialog {
   margin-top: 10vh !important;
 }
@@ -5295,7 +5302,7 @@ export default {
   margin-bottom: 10px;
 }
 
-.redioStyle >>> .el-radio__label {
+.redioStyle>>>.el-radio__label {
   font-size: 18px;
 }
 
@@ -6372,7 +6379,8 @@ export default {
 .redCss {
   color: red;
 }
-.redioStyle>>>.el-radio__input.is-disabled+span.el-radio__label{
+
+.redioStyle>>>.el-radio__input.is-disabled+span.el-radio__label {
   color: rgb(0 123 255) !important;
 }
 </style>

+ 11 - 4
src/components/studyStudent.vue

@@ -1387,6 +1387,11 @@
                         {{ s.student }}
                       </div>
                     </div>
+                    <AnswerData2 v-if="
+                      worksStudent.length &&
+                      worksStudent[toolIndex].length > 0
+                    " :problemJson="tool.selectJson.answer"
+                      :people="worksStudent[toolIndex]"></AnswerData2>
                   </div>
                   <div v-if="tType && tType == 2 && tool.tool.indexOf(41) != -1" class="worksBox">
                     <div style="padding-top: 15px; font-size: 18px" v-if="workStudent[toolIndex].length > 0">
@@ -2091,13 +2096,14 @@
 import "../common/aws-sdk-2.235.1.min.js";
 import pdf from "./components/pdf3";
 import AskStatic from "./components/askStatic";
+import AnswerData2 from "./components/answerData2";
 import EditorBar from "./tools/wangEnduit.vue";
 import Time from "./tools/time.vue";
 import Mind from "./tools/jsmind.vue";
 import Sunburst from "./tools/sunburst";
 import SeeBoard from "./tools/seeBoard";
 export default {
-  components: { EditorBar, Time, pdf, AskStatic, Mind, Sunburst, SeeBoard },
+  components: { EditorBar, Time, pdf, AskStatic, Mind, Sunburst, SeeBoard, AnswerData2 },
   data() {
     return {
       dialogVisible: false,
@@ -2152,7 +2158,7 @@ export default {
       ],
       mr: require("../assets/vedioPic.png"),
       word: require("../assets/icon/isWord.png"),
-      video:require("../assets/icon/isVideo.png"),
+      video: require("../assets/icon/isVideo.png"),
       noLikes: require("../assets/icon/comment/noLikes.png"),
       likes: require("../assets/icon/comment/likes.png"),
       courseDetail: {},
@@ -5440,7 +5446,7 @@ export default {
   margin-bottom: 10px;
 }
 
-.redioStyle >>> .el-radio__label {
+.redioStyle>>>.el-radio__label {
   font-size: 18px;
 }
 
@@ -6512,7 +6518,8 @@ export default {
 .redCss {
   color: red;
 }
-.redioStyle>>>.el-radio__input.is-disabled+span.el-radio__label{
+
+.redioStyle>>>.el-radio__input.is-disabled+span.el-radio__label {
   color: rgb(0 123 255) !important;
 }
 </style>

部分文件因文件數量過多而無法顯示