소스 검색

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

zengyicheng 3 년 전
부모
커밋
0c34e94ec7
4개의 변경된 파일38개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 0
      package.json
  2. BIN
      src/assets/tips.png
  3. 34 5
      src/components/pages/components/answerData.vue
  4. 3 1
      src/main.js

+ 1 - 0
package.json

@@ -15,6 +15,7 @@
     "echarts": "^5.0.2",
     "element-ui": "^2.15.1",
     "file-saver": "^2.0.5",
+    "hevue-img-preview": "^5.0.3",
     "jquery": "^3.6.0",
     "js-pinyin": "^0.1.9",
     "qs": "^6.10.1",

BIN
src/assets/tips.png


+ 34 - 5
src/components/pages/components/answerData.vue

@@ -3,10 +3,18 @@
     <div class="title">
       <span>问答数量</span>
     </div>
-    <div style="width: 100%">
+    <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="tips">
+      <img src="../../../assets/tips.png" alt />
+      <span>
+        提示:目前答对
+        <span>正确选项B</span>的,只有
+        <span>{{problemJson.B}}</span>位同学!学要继续往“实践探究”方向继续加强学习哦!
+      </span>
+    </div>
   </div>
 </template>
 
@@ -18,7 +26,7 @@ export default {
       chartObj: null,
       ooption: {
         xdata: ["A", "B", "C", "D"],
-        sdata: [],
+        sdata: [0, 0, 0, 0],
       },
       option: {
         tooltip: {
@@ -102,6 +110,7 @@ export default {
         this.option.series[0].data = this.ooption.sdata;
         this.chartObj.setOption(this.option);
       }
+      this.$forceUpdate();
     },
   },
   mounted() {
@@ -123,7 +132,7 @@ export default {
 <style scoped>
 .data_body {
   height: 500px;
-  display: flex;
+  /* display: flex; */
   position: relative;
   border-radius: 5px;
   /* border: 1px solid #eee; */
@@ -134,8 +143,28 @@ export default {
   background: #fff;
 }
 .data_body .title {
-  position: absolute;
+  /* position: absolute;
   top: 20px;
-  left: 20px;
+  left: 20px; */
+}
+
+.tips {
+  display: flex;
+  align-items: center;
+  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;
 }
 </style>

+ 3 - 1
src/main.js

@@ -15,10 +15,12 @@ import VueCookies from 'vue-cookies'
 import Viewer from 'v-viewer'
 import 'viewerjs/dist/viewer.css'
 import Clipboard from "clipboard";
+import hevueImgPreview from 'hevue-img-preview'
+
 const echarts = require('echarts');
 
 
-Vue.use(VideoPlayer).use(VueCookies).use(Viewer)
+Vue.use(VideoPlayer).use(VueCookies).use(Viewer).use(hevueImgPreview)
 Vue.config.productionTip = false
 Vue.prototype.$store = store; // 将store实例挂在vue原型上
 Vue.prototype.ajax = ajax