lsc 1 год назад
Родитель
Сommit
7db3d4188f

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.222d585b08ad4def29c2e3a49e6198c9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.920758910306febc0621.js></script><script type=text/javascript src=./static/js/app.0433a68a1262ef1297f1.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.4c03d8bf89120f478fb11ecf4e9a4521.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.920758910306febc0621.js></script><script type=text/javascript src=./static/js/app.eb8bb809d7384f2d6a74.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/css/app.222d585b08ad4def29c2e3a49e6198c9.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/css/app.222d585b08ad4def29c2e3a49e6198c9.css.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/css/app.4c03d8bf89120f478fb11ecf4e9a4521.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/css/app.4c03d8bf89120f478fb11ecf4e9a4521.css.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/app.eb8bb809d7384f2d6a74.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/app.eb8bb809d7384f2d6a74.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 81 - 47
src/components/pages/dataBoardNew/project/chartList/subjuect.vue

@@ -20,6 +20,11 @@ export default {
   components: {
     highcharts: Chart,
   },
+  props: {
+    resultSubject: {
+      type: Array,
+    },
+  },
   data() {
     return {
       chartObj: null,
@@ -33,56 +38,70 @@ export default {
         credits: {
             enabled: false//不显示LOGO
         },
+        tooltip: {
+          formatter: function() {
+            // 自定义弹窗内容的回调函数
+            var point = this.point;
+            if(point.from){
+              var tooltipText = '<b>' + point.from + '</b> - <b>' + point.to + '</b>: ' + point.weight;
+              return tooltipText;
+            }else{
+              var tooltipText = '<b>' + point.name + '</b>: ' + point.sum;
+              return tooltipText;
+            }
+
+          }
+        },
         series: [{
           keys: ['from', 'to', 'weight'],
           data: [
-            ['Brazil', 'Portugal', 5],
-            ['Brazil', 'France', 1],
-            ['Brazil', 'Spain', 1],
-            ['Brazil', 'England', 1],
-            ['Canada', 'Portugal', 1],
-            ['Canada', 'France', 5],
-            ['Canada', 'England', 1],
-            ['Mexico', 'Portugal', 1],
-            ['Mexico', 'France', 1],
-            ['Mexico', 'Spain', 5],
-            ['Mexico', 'England', 1],
-            ['USA', 'Portugal', 1],
-            ['USA', 'France', 1],
-            ['USA', 'Spain', 1],
-            ['USA', 'England', 5],
-            ['Portugal', 'Angola', 2],
-            ['Portugal', 'Senegal', 1],
-            ['Portugal', 'Morocco', 1],
-            ['Portugal', 'South Africa', 3],
-            ['France', 'Angola', 1],
-            ['France', 'Senegal', 3],
-            ['France', 'Mali', 3],
-            ['France', 'Morocco', 3],
-            ['France', 'South Africa', 1],
-            ['Spain', 'Senegal', 1],
-            ['Spain', 'Morocco', 3],
-            ['Spain', 'South Africa', 1],
-            ['England', 'Angola', 1],
-            ['England', 'Senegal', 1],
-            ['England', 'Morocco', 2],
-            ['England', 'South Africa', 7],
-            ['South Africa', 'China', 5],
-            ['South Africa', 'India', 1],
-            ['South Africa', 'Japan', 3],
-            ['Angola', 'China', 5],
-            ['Angola', 'India', 1],
-            ['Angola', 'Japan', 3],
-            ['Senegal', 'China', 5],
-            ['Senegal', 'India', 1],
-            ['Senegal', 'Japan', 3],
-            ['Mali', 'China', 5],
-            ['Mali', 'India', 1],
-            ['Mali', 'Japan', 3],
-            ['Morocco', 'China', 5],
-            ['Morocco', 'India', 1],
-            ['Morocco', 'Japan', 3],
-            ['Japan', 'Brazil', 1]
+            // ['Brazil', 'Portugal', 5],
+            // ['Brazil', 'France', 1],
+            // ['Brazil', 'Spain', 1],
+            // ['Brazil', 'England', 1],
+            // ['Canada', 'Portugal', 1],
+            // ['Canada', 'France', 5],
+            // ['Canada', 'England', 1],
+            // ['Mexico', 'Portugal', 1],
+            // ['Mexico', 'France', 1],
+            // ['Mexico', 'Spain', 5],
+            // ['Mexico', 'England', 1],
+            // ['USA', 'Portugal', 1],
+            // ['USA', 'France', 1],
+            // ['USA', 'Spain', 1],
+            // ['USA', 'England', 5],
+            // ['Portugal', 'Angola', 2],
+            // ['Portugal', 'Senegal', 1],
+            // ['Portugal', 'Morocco', 1],
+            // ['Portugal', 'South Africa', 3],
+            // ['France', 'Angola', 1],
+            // ['France', 'Senegal', 3],
+            // ['France', 'Mali', 3],
+            // ['France', 'Morocco', 3],
+            // ['France', 'South Africa', 1],
+            // ['Spain', 'Senegal', 1],
+            // ['Spain', 'Morocco', 3],
+            // ['Spain', 'South Africa', 1],
+            // ['England', 'Angola', 1],
+            // ['England', 'Senegal', 1],
+            // ['England', 'Morocco', 2],
+            // ['England', 'South Africa', 7],
+            // ['South Africa', 'China', 5],
+            // ['South Africa', 'India', 1],
+            // ['South Africa', 'Japan', 3],
+            // ['Angola', 'China', 5],
+            // ['Angola', 'India', 1],
+            // ['Angola', 'Japan', 3],
+            // ['Senegal', 'China', 5],
+            // ['Senegal', 'India', 1],
+            // ['Senegal', 'Japan', 3],
+            // ['Mali', 'China', 5],
+            // ['Mali', 'India', 1],
+            // ['Mali', 'Japan', 3],
+            // ['Morocco', 'China', 5],
+            // ['Morocco', 'India', 1],
+            // ['Morocco', 'Japan', 3],
+            // ['Japan', 'Brazil', 1]
           ],
           type: 'dependencywheel',
           name: '',
@@ -115,10 +134,25 @@ export default {
         // this.chartObj.setOption(this.option);
       });
     },
+    setArray(array) {
+      this.option.series[0].data = array
+
+    }
   },
   watch: {
+    resultSubject: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
   },
   mounted() {
+    this.setArray(this.resultSubject)
+    // this.setChart();
+
   },
 };
 </script>

+ 88 - 15
src/components/pages/dataBoardNew/project/index.vue

@@ -187,7 +187,7 @@
               <span>{{ worksCount && allCourse ? (worksCount / allCourse).toFixed(0) : 0 }}</span>
             </div>
           </div>
-          <WorkNum v-if="shType" style="height: calc(100% - 105px)" :workNumList="workNumList"></WorkNum>
+          <WorkNum v-if="shType" style="height: calc(100% - 105px)" :workNumList="workNumList" @openCours="openCourse"></WorkNum>
           <div class="otherCss">
             <div v-if="!shType">转换为散点图</div>
             <div v-if="shType">转换为堆积柱状图</div>
@@ -216,9 +216,10 @@
               项目占比
             </div>
           </div>
-          <el-select v-model="cType4" class="selectBox" style="width: 110px" v-if="toolType == 0 && (gradeCourseList.length || subjectCourseList.length)"  @change="typeChange">
-            <el-option label="赛道" value="box"></el-option>
-            <el-option label="主题" value="theme"></el-option>
+          <el-select v-model="cType4" class="selectBox" style="width: 110px" v-if="toolType == 0 && (gradeCourseList.length || subjectCourseList.length || subjectCourseList.length)"  @change="typeChange">
+            <el-option :label="gradeCourseList[0].typeName" value="box" v-if="gradeCourseList.length"></el-option>
+            <el-option :label="subjectCourseList[0].typeName" value="theme" v-if="subjectCourseList.length"></el-option>
+            <el-option :label="themeCourseList[0].typeName" value="theme2" v-if="themeCourseList.length"></el-option>
           </el-select>
           <!-- <div v-if="toolType == 1" style="
               display: flex;
@@ -248,7 +249,9 @@
           <div class="title">项目学科分布</div>
         </div>
         <div class="dataBox">
-          <subjuect style="height: calc(100% - 30px)" v-if="!xtType"></subjuect>
+          <subjuect style="height: calc(100% - 30px)" v-if="!xtType" 
+          :resultSubject="resultSubject"
+          ></subjuect>
           <WorkTime style="height: calc(100% - 30px)" v-if="xtType" :personArray="personList"></WorkTime>
           <div class="otherCss">
             <div v-if="!xtType">转换为人员协同</div>
@@ -341,16 +344,21 @@ export default {
       tsArray: {},
       gradeCourseList:[],
       subjectCourseList:[],
+      themeCourseList: [],
       courseNumberArray:[],
       pCourseList:[],
       courseArray: [],
       worksYearArray: {},
+      resultSubject: [],
     };
   },
   mounted() {
     this.getData();
   },
   methods: {
+    openCourse(cid) {
+      window.parent.postMessage({ cid: cid, screenType: "3s" }, "*");
+    },
     otherEchart() {
       this.oType = !this.oType;
     },
@@ -421,6 +429,7 @@ export default {
           this.isLoading = false;
           let _grade = JSON.parse(JSON.stringify(res.data[0])); //赛道
           let _subject = JSON.parse(JSON.stringify(res.data[1])); //主题
+          let _theme = JSON.parse(JSON.stringify(res.data[10])); //主题
           this.allCourse = res.data[2][0].count; //课程总数
           let _timeCourse = res.data[3]; //查询半年内全部课程
           this.courseTemplate = res.data[4][0].count; //查询模板课程总数
@@ -570,7 +579,6 @@ export default {
             ts: 0, //师生
             ss: 0,//学生
           } //记录项目的师生分工
-
           for (var i = 0; i < _workCourse.length; i++) {
             if (!wList[_workCourse[i].courseId]) {
               let _date = new Date(weekArray.lastWeek[0])
@@ -656,7 +664,7 @@ export default {
                   for (
                     var q = 0;
                     q <
-                      _taskJson[k].toolArray ? _taskJson[k].toolArray.length : 0;
+                      (_taskJson[k].toolArray ? _taskJson[k].toolArray.length : 0);
                     q++
                   ) {
                     if (_taskJson[k].toolArray[q].tool == 1) {
@@ -697,8 +705,8 @@ export default {
           for (var i = 0; i < _workCourse.length; i++) {
             let a = Object.keys(wList);
             for (var j = 0; j < Object.keys(wList).length; j++) {
-              if (_workCourse[i].courseId == wList[a[j]].cid && _workCourse[i].id) {
-                wList[a[j]].work++;
+              if (_workCourse[i].courseId == wList[a[j]].cid && _workCourse[i].worksCount > 0) {
+                wList[a[j]].work+=_workCourse[i].worksCount;
               }
             }
           }
@@ -719,16 +727,18 @@ export default {
           let _course = res.data[9]
           let _gradeCourseList = []
           let _subjectCourseList = []
+          let _themeCourseList = []
 
           for (var i = 0; i < _grade.length; i++) {
             _gradeCourseList.push({
               name: _grade[i].name,
               typeid: _grade[i].id,
+              typeName: _grade[i].typeName,
               course: 0,
               array: []
             })
             for (var z = 0; z < _course.length; z++) {
-              if (_course[z].typeid == _grade[i].id) {
+              if (_course[z].typeid.indexOf(_grade[i].id) != -1) {
                 _gradeCourseList[i].course++
                 _gradeCourseList[i].array.push(_course[z].courseid)
               }
@@ -739,18 +749,36 @@ export default {
             _subjectCourseList.push({
               name: _subject[i].name,
               typeid: _subject[i].id,
+              typeName: _subject[i].typeName,
               course: 0,
               array: []
             })
             for (var z = 0; z < _course.length; z++) {
-              if (_course[z].typeid == _subject[i].id) {
+              if (_course[z].typeid.indexOf(_subject[i].id) != -1) {
                 _subjectCourseList[i].course++
                 _subjectCourseList[i].array.push(_course[z].courseid)
               }
             }
           }
+
+          for (var i = 0; i < _theme.length; i++) {
+            _themeCourseList.push({
+              name: _theme[i].name,
+              typeid: _theme[i].id,
+              typeName: _theme[i].typeName,
+              course: 0,
+              array: []
+            })
+            for (var z = 0; z < _course.length; z++) {
+              if (_course[z].typeid.indexOf(_theme[i].id) != -1) {
+                _themeCourseList[i].course++
+                _themeCourseList[i].array.push(_course[z].courseid)
+              }
+            }
+          }
           this.gradeCourseList = _gradeCourseList
           this.subjectCourseList = _subjectCourseList
+          this.themeCourseList = _themeCourseList
           this.pCourseList = [{name:'未分类',typeid:0,course:res.data[2][0].count}]
           this.typeChange()
 
@@ -768,7 +796,7 @@ export default {
               subject: [],
             })
             for (var z = 0; z < _course.length; z++) {
-              if (_course[z].typeid == _grade[i].id) {
+              if (_course[z].typeid.indexOf(_grade[i].id) != -1) {
                 _gradeCourse++
                 if (_courseArray[i].courseid.indexOf(_course[z].courseid) === -1) {
                   _courseArray[i].courseid.push(_course[z].courseid)
@@ -783,7 +811,7 @@ export default {
                 course: 0
               })
               for (var z = 0; z < _course.length; z++) {
-                if (_course[z].typeid == _subject[j].id && _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1) {
+                if (_course[z].typeid.indexOf(_subject[j].id) != -1 && _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1) {
                   _courseArray[i].subject[j].course++
                 }
               }
@@ -798,13 +826,53 @@ export default {
           }
           for (var j = 0; j < _subject.length; j++) {
             for (var z = 0; z < _course.length; z++) {
-              if (_course[z].typeid == _subject[j].id) {
+              if (_course[z].typeid.indexOf(_subject[j].id) != -1) {
                 _subjectCourse++
               }
             }
           }
 
           this.courseArray = _courseArray
+
+
+          let CourseLabel = res.data[9]; //带分类的课程
+          let _subject2 = JSON.parse(JSON.stringify(res.data[1]));
+          let _grade2 = JSON.parse(JSON.stringify(res.data[0]));
+          const resultSubject = [];
+          for (let i = 0; i < _subject2.length - 1; i++) {
+            for (let j = 0; j < _grade2.length; j++) {
+              resultSubject.push({
+                id: [_subject2[i].id, _grade2[j].id],
+                name: [_subject2[i].name, _grade2[j].name],
+                count: 0,
+              });
+              console.log([_subject2[i].name, _grade2[j].name]);
+            }
+          }
+
+          for (var i = 0; i < CourseLabel.length; i++) {
+            if (!CourseLabel[i].typeid) {
+              continue;
+            }
+            let array = CourseLabel[i].typeid.split(",");
+            for (var j = 0; j < resultSubject.length; j++) {
+              if (this.checkArrayInclusion(resultSubject[j].id, array)) {
+                resultSubject[j].count++;
+              }
+            }
+          }
+
+          let resultSubject2 = [];
+
+          for (var i = 0; i < resultSubject.length; i++) {
+            let el = resultSubject[i];
+            if (el.count > 0) {
+              resultSubject2.push([el.name[0], el.name[1], el.count]);
+            }
+          }
+
+          this.resultSubject = resultSubject2;
+          console.log(resultSubject);
           this.$forceUpdate();
         })
         .catch((err) => {
@@ -813,13 +881,18 @@ export default {
           console.error(err);
         });
     },
+    checkArrayInclusion(arr1, arr2) {
+      return arr1.every((item) => arr2.includes(item));
+    },
     typeChange() { 
       if (this.cType4 === 'box') {
         this.courseNumberArray = this.gradeCourseList
       } else if (this.cType4 === 'theme') {
         this.courseNumberArray = this.subjectCourseList
+      }else if(this.cType4 === 'theme2'){
+        this.courseNumberArray = this.themeCourseList
       }
-      if(!this.gradeCourseList.length && !this.subjectCourseList.length){
+      if(!this.gradeCourseList.length && !this.subjectCourseList.length && !this.themeCourseList.length){
         this.courseNumberArray = this.pCourseList
       }
       this.$forceUpdate();

+ 25 - 9
src/components/pages/test/check/index.vue

@@ -74,14 +74,17 @@
             </div>
           </div>
           <div class="title_content" v-if="stype == 1">
-            <div class="title_box" v-if="!testArray.length" style="display: flex;align-items: center;justify-content: center;height: 500px;">
+            <div class="title_box" v-if="!testArray.length"
+              style="display: flex;align-items: center;justify-content: center;height: 500px;">
               暂无内容
             </div>
             <div class="title_box" v-for="(item, index) in testArray" :key="index">
               <div class="title">
-                <span class="test_icon"
-                  :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5 }"></span><span>{{
-                    item.title }}</span>
+                <el-tooltip :content="selectType(item)" placement="top" effect="dark">
+                  <span class="test_icon"
+                    :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5 }"></span>
+                </el-tooltip>
+                <span>{{ item.title }}</span>
               </div>
               <div class="detail" v-if="item.detail">{{ item.detail }}</div>
               <div class="content1" v-if="item.type == 1">
@@ -158,7 +161,7 @@
                   {{ scope.$index + 1 }}
                 </template>
               </el-table-column>
-              <el-table-column fixed prop="name" label="提交人" min-width="150" align="left">
+              <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
               </el-table-column>
               <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title" min-width="150"
                 align="left">
@@ -291,6 +294,19 @@ export default {
     //     return array.length ? _array : [];
     //   };
     // },
+    selectType() {
+      return function (item) {
+        if (item.type == 1 && item.atype == 2) {
+          return '多选题'
+        } else if (item.type == 1 && item.atype == 1) {
+          return '单选题'
+        } else if (item.type == 3) {
+          return '问答题'
+        } else if (item.type == 5) {
+          return '附件'
+        }
+      };
+    }
   },
   methods: {
     wordClickHandler(name, value) {
@@ -933,12 +949,12 @@ export default {
 
 .title_content>.title_box>.content1>.left>.title>span:nth-child(1),
 .title_content>.title_box>.content1>.left>.data>span:nth-child(1) {
-  width: calc(100% - 320px - 55px);
+  width: calc(100% - 320px - 110px);
 }
 
 .title_content>.title_box>.content1>.left>.title>span:nth-child(2),
 .title_content>.title_box>.content1>.left>.data>span:nth-child(2) {
-  width: 55px;
+  width: 110px;
 }
 
 .title_content>.title_box>.content1>.left>.title>span:nth-child(3),
@@ -1018,12 +1034,12 @@ export default {
   border: 1px solid #e7e7e7;
 }
 
-.title_content>.title_box>.content2>.right >>> .wordCloud{
+.title_content>.title_box>.content2>.right>>>.wordCloud {
   height: auto;
   min-height: 300px;
 }
 
-.title_content>.title_box>.content3{
+.title_content>.title_box>.content3 {
   display: flex;
   width: 100%;
   overflow: auto;

Некоторые файлы не были показаны из-за большого количества измененных файлов