Browse Source

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

zengyicheng 2 years ago
parent
commit
c667f229d7

+ 1 - 1
dist/index.html

@@ -25,4 +25,4 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.28c5cde72d6f879e54ba7d6ecd736027.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.85f48b0184f614b2b8d9.js></script><script type=text/javascript src=./static/js/vendor.5381b06bfaaab9dbd007.js></script><script type=text/javascript src=./static/js/app.68f49af0d198077b614b.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>
+    }</style><link href=./static/css/app.af5d6af1e8febdee784e585b83b6f503.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.85f48b0184f614b2b8d9.js></script><script type=text/javascript src=./static/js/vendor.5381b06bfaaab9dbd007.js></script><script type=text/javascript src=./static/js/app.7fd4c7feababcf684fb4.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.af5d6af1e8febdee784e585b83b6f503.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.af5d6af1e8febdee784e585b83b6f503.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.68f49af0d198077b614b.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.68f49af0d198077b614b.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.7fd4c7feababcf684fb4.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.7fd4c7feababcf684fb4.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.85f48b0184f614b2b8d9.js.map


+ 1 - 1
src/components/pages/addCourse.vue

@@ -4776,7 +4776,7 @@ ol {
 
 /* 评价样式 */
 .elist_css {
-  margin-bottom: 60px;
+  padding-bottom: 60px !important;
 }
 .elist_title {
   margin-bottom: 10px;

+ 41 - 10
src/components/pages/evaluation.vue

@@ -244,13 +244,34 @@
             <div class="e_add_list_pbox_title">
               <span class="type_title">切换模式</span>
               <div class="type_content">
-                <span :class="{'active':typeMode==1}" @click="typeMode = 1">目标树</span>
-                <span :class="{'active':typeMode==2}" @click="typeMode = 2">目标罗盘</span>
-                <span :class="{'active':typeMode==3}" @click="typeMode = 3">目标看板</span>
+                <span :class="{ active: typeMode == 1 }" @click="typeMode = 1"
+                  >目标树</span
+                >
+                <span :class="{ active: typeMode == 2 }" @click="typeMode = 2"
+                  >目标罗盘</span
+                >
+                <span :class="{ active: typeMode == 3 }" @click="typeMode = 3"
+                  >目标看板</span
+                >
               </div>
             </div>
             <div class="e_add_list_pbox_content">
-              <Mind :showBar="false" :mindData="data" v-show="typeMode == 1"></Mind>
+              <Mind
+                :showBar="false"
+                :mindData="data"
+                v-show="typeMode == 1"
+              ></Mind>
+              <Sunburst
+                :Josn="eJson"
+                :num="eJSONNum"
+                v-if="typeMode == 2"
+              ></Sunburst>
+              <SeeBoard
+                :Josn="eJson"
+                :num="eJSONNum"
+                :ename="eTitle"
+                v-if="typeMode == 3"
+              ></SeeBoard>
             </div>
           </div>
         </div>
@@ -287,9 +308,13 @@
 
 <script>
 import Mind from "../tools/jsmind";
+import Sunburst from "../tools/sunburst";
+import SeeBoard from "../tools/seeBoard";
 export default {
   components: {
     Mind,
+    Sunburst,
+    SeeBoard,
   },
   data() {
     return {
@@ -336,7 +361,8 @@ export default {
       dataArray: [],
       update: false,
       eid: "",
-      typeMode:1
+      typeMode: 1,
+      eJSONNum: 0,
     };
   },
   methods: {
@@ -398,6 +424,7 @@ export default {
         this.dialogVisible3 = false;
         this.eName = "";
       }
+      this.eJSONNum++;
       this.setMindData();
     },
     checkF(id) {
@@ -434,6 +461,7 @@ export default {
         this.fid = "";
       }
       delete this.eJson[id];
+      this.eJSONNum++;
       this.$forceUpdate();
       this.setMindData();
     },
@@ -446,6 +474,7 @@ export default {
         this.sid = "";
       }
       delete this.eJson[this.fid].child[id];
+      this.eJSONNum++;
       this.$forceUpdate();
       this.setMindData();
     },
@@ -454,6 +483,7 @@ export default {
         this.tid = "";
       }
       delete this.eJson[this.fid].child[this.sid].child[id];
+      this.eJSONNum++;
       this.$forceUpdate();
       this.setMindData();
     },
@@ -574,6 +604,7 @@ export default {
       this.eTitle = res.title;
       this.eid = res.id;
       this.update = true;
+      this.typeMode = 1;
       this.dialogVisible = true;
       this.$forceUpdate();
       setTimeout(() => {
@@ -905,24 +936,24 @@ export default {
   padding: 0 20px;
 }
 
-.type_title{
+.type_title {
   font-size: 18px;
   font-weight: 700;
 }
-.type_content{
+.type_content {
   font-size: 16px;
   margin-left: 30px;
 }
-.type_content span+span{
+.type_content span + span {
   margin-left: 20px;
 }
-.type_content span{
+.type_content span {
   cursor: pointer;
   padding-bottom: 5px;
   box-sizing: border-box;
 }
 
-.type_content .active{
+.type_content .active {
   color: #409eff;
   border-bottom: 2px solid #409eff;
 }

+ 244 - 0
src/components/tools/seeBoard.vue

@@ -0,0 +1,244 @@
+<template>
+  <div class="data_body">
+    <div class="noMind" v-if="mindV">
+      <img src="../../assets/nominddata.png" alt />
+    </div>
+    <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
+    <div class="b_box">
+      <div class="b_box_table">
+        <div class="bbt_title">{{ ename }}</div>
+        <div class="bbt_content">
+          <div v-for="(item, index) in ooption" :key="index" class="bbt_c1">
+            <div
+              class="bbt_c1_div"
+              :class="{ bbn: index == ooption.length - 1 }"
+            >
+              {{ item.name }}
+            </div>
+            <div class="bbt_c2">
+              <div
+                v-for="(item2, index2) in item.children"
+                :key="index + '-' + index2"
+                class="bbt_c1"
+              >
+                <div
+                  class="bbt_c2_div"
+                  :class="{
+                    bbn:
+                      index2 == item.children.length - 1 &&
+                      index == ooption.length - 1,
+                  }"
+                >
+                  {{ item2.name }}
+                </div>
+                <div class="bbt_c3">
+                  <div
+                    v-for="(item3, index3) in item2.children"
+                    :key="index + '-' + index2 + '-' + index3"
+                    :class="{
+                      bbn:
+                        index2 == item.children.length - 1 &&
+                        index == ooption.length - 1 &&
+                        index3 == item2.children.length - 1,
+                    }"
+                  >
+                    {{ item3.name }}
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["Josn", "num", "ename"],
+  data() {
+    return {
+      mindV: true,
+      ooption: [],
+    };
+  },
+  methods: {
+    setData() {
+      if (!Object.keys(this.Josn).length) {
+        this.mindV = true;
+      } else {
+        this.mindV = false;
+      }
+      var res = this.Josn;
+      var _array = [];
+      let i = 0;
+      for (var item in res) {
+        let num = Object.keys(res);
+        let count = 10 / num.length;
+        let _item = res[item];
+        _array.push({ name: _item.name, value: count, children: [] });
+        let j = 0;
+        for (var item2 in _item.child) {
+          let num2 = Object.keys(res);
+          let count2 = count / num2.length;
+          let _item2 = _item.child[item2];
+          _array[i].children.push({
+            name: _item2.name,
+            value: count2,
+            children: [],
+          });
+          for (var item3 in _item2.child) {
+            let num3 = Object.keys(res);
+            let count3 = count2 / num3.length;
+            let _item3 = _item2.child[item3];
+            _array[i].children[j].children.push({
+              name: _item3.name,
+              value: count3,
+            });
+          }
+          j++;
+        }
+        i++;
+        console.log(item);
+      }
+      this.ooption = _array;
+    },
+  },
+  watch: {
+    num: {
+      handler: function (newVal, oldVal) {
+        this.setData();
+      },
+      deep: true,
+    },
+    Josn: {
+      handler: function (newVal, oldVal) {},
+      deep: true,
+    },
+  },
+  mounted() {
+    this.setData();
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  /* display: flex; */
+  /* flex-direction: column; */
+  width: 500px;
+  height: 450px;
+  /* height: 500px; */
+  /* margin: 15px 5px 0 0; */
+  background: #fff;
+  overflow: hidden;
+  flex-shrink: 0;
+  position: relative;
+}
+.noMind {
+  position: absolute;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
+  z-index: 999;
+  background: #fff;
+}
+
+.b_box {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  overflow: auto;
+}
+
+.b_box_table {
+  border: 2px solid #000;
+  height: fit-content;
+  width: auto;
+  margin: 20px 0;
+}
+
+.bbt_content {
+}
+
+.bbt_title {
+  height: 50px;
+  width: 330px;
+  border-bottom: 2px solid #000;
+  text-align: center;
+  line-height: 50px;
+  font-size: 18px;
+  background: rgb(57, 76, 165);
+  color: #fff;
+}
+.bbt_c1 {
+  display: flex;
+  width: 100%;
+}
+.bbt_c1_div {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-bottom: 2px solid #000;
+  max-width: 110px;
+  width: 110px;
+  min-height: 50px;
+  font-size: 16px;
+  background: rgb(171, 179, 214);
+  color: #000;
+  box-sizing: border-box;
+  padding: 5px 10px;
+}
+.bbt_c2 {
+  display: flex;
+  flex-direction: column;
+  max-width: 220px;
+  width: 220px;
+  border-left: 2px solid #000;
+  box-sizing: border-box;
+}
+.bbt_c2_div {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  max-width: 110px;
+  width: 110px;
+  border-bottom: 2px solid #000;
+  min-height: 50px;
+  background: rgb(189, 194, 226);
+  color: #000;
+  box-sizing: border-box;
+  padding: 5px 10px;
+}
+.bbt_c3 {
+  display: flex;
+  flex-direction: column;
+  max-width: 110px;
+  width: 110px;
+  border-left: 2px solid #000;
+}
+.bbt_c3 > div {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  min-height: 50px;
+  width: 100%;
+  height: 100%;
+  background: rgb(214, 216, 234);
+  color: #000;
+  border-bottom: 2px solid #000;
+  box-sizing: border-box;
+  padding: 5px 10px;
+}
+.bl {
+  border-left: 2px solid #000;
+}
+
+.bbn {
+  border-bottom: none !important;
+}
+</style>

+ 157 - 0
src/components/tools/sunburst.vue

@@ -0,0 +1,157 @@
+<template>
+  <div class="data_body">
+    <div class="noMind" v-if="mindV">
+      <img src="../../assets/nominddata.png" alt />
+    </div>
+    <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
+    <div
+      id="charts_canvas"
+      class="echart"
+      style="width: 100%; height: 100%"
+    ></div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["Josn", "num"],
+  data() {
+    return {
+      mindV: true,
+      chartObj: null,
+      timer: null,
+      ooption: [],
+      option: {
+        series: {
+          type: "sunburst",
+          data: [],
+          radius: [30, "90%"],
+          label: {
+            rotate: "radial",
+          },
+        },
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series.data = option;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setData() {
+      if (!Object.keys(this.Josn).length) {
+        this.mindV = true;
+      } else {
+        this.mindV = false;
+      }
+      var res = this.Josn;
+      var _array = [];
+      let i = 0;
+      for (var item in res) {
+        let num = Object.keys(res);
+        let count = 10 / num.length;
+        let _item = res[item];
+        _array.push({ name: _item.name, value: count, children: [] });
+        let j = 0;
+        for (var item2 in _item.child) {
+          let num2 = Object.keys(res);
+          let count2 = count / num2.length;
+          let _item2 = _item.child[item2];
+          _array[i].children.push({
+            name: _item2.name,
+            value: count2,
+            children: [],
+          });
+          for (var item3 in _item2.child) {
+            let num3 = Object.keys(res);
+            let count3 = count2 / num3.length;
+            let _item3 = _item2.child[item3];
+            _array[i].children[j].children.push({
+              name: _item3.name,
+              value: count3,
+            });
+          }
+          j++;
+        }
+        i++;
+        console.log(item);
+      }
+      this.ooption = _array;
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.series.data = this.ooption;
+        this.chartObj.setOption(this.option);
+      }
+    },
+  },
+  watch: {
+    num: {
+      handler: function (newVal, oldVal) {
+        this.setData();
+      },
+      deep: true,
+    },
+    Josn: {
+      handler: function (newVal, oldVal) {},
+      deep: true,
+    },
+  },
+  mounted() {
+    this.setData();
+    var _this = this;
+    // _this.timer = setInterval(() => {
+    //   if (_this.chartObj) {
+    //     _this.chartObj.resize();
+    //   }
+    // }, 0);
+    // window.addEventListener("resize", () => {
+    //   if (_this.chartObj) {
+    //     _this.chartObj.resize();
+    //   }
+    // });
+  },
+  beforeDestroy() {
+    // clearInterval(this.timer);
+    // this.timer = null
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  /* display: flex; */
+  /* flex-direction: column; */
+  width: 500px;
+  height: 450px;
+  /* height: 500px; */
+  /* margin: 15px 5px 0 0; */
+  background: #fff;
+  overflow: hidden;
+  flex-shrink: 0;
+  position: relative;
+}
+.noMind {
+  position: absolute;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
+  z-index: 999;
+  background: #fff;
+}
+</style>

Some files were not shown because too many files changed in this diff