lsc 1 年之前
父节点
当前提交
b2d21b5905

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.8e4cae0d709038ffc0b5d40b80c1ae36.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.b99f0ffaf6e2bdd0ae12.js></script><script type=text/javascript src=./static/js/app.26405fd22663e3690af6.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.367a1393c422a7306a686061d5d9ec7e.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.b99f0ffaf6e2bdd0ae12.js></script><script type=text/javascript src=./static/js/app.ccb2caecd19ca1436235.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.367a1393c422a7306a686061d5d9ec7e.css


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.367a1393c422a7306a686061d5d9ec7e.css.map


二进制
dist/static/img/delete_test_icon.55a19de.png


二进制
dist/static/img/share_test_icon.a1c590b.png


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.ccb2caecd19ca1436235.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.ccb2caecd19ca1436235.js.map


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


二进制
src/assets/icon/test/delete_test_icon.png


二进制
src/assets/icon/test/share_test_icon.png


+ 20 - 14
src/components/pages/test/data/pie1.vue

@@ -9,8 +9,8 @@
 <script>
 export default {
     props: {
-        loginArray: {
-            type: Array
+        dataJ: {
+            type: Object
         },
     },
     data() {
@@ -80,10 +80,11 @@ export default {
                         },
                         hoverOffset: 0, // 设置鼠标悬停时不放大
                         data: [
-                            { value: 10, name: '进行中', itemStyle: { normal: { color: '#3673e8' } } },
-                            { value: 8, name: '未发布', itemStyle: { normal: { color: '#61b8ff' } } },
-                            { value: 6, name: '已完成', itemStyle: { normal: { color: '#96d8a8' } } },
-                            { value: 7, name: '逾期', itemStyle: { normal: { color: '#f5b763' } } },
+                            // { value: 10, name: '进行中', itemStyle: { normal: { color: '#3673e8' } } },
+                            // { value: 7, name: '未进行', itemStyle: { normal: { color: '#f5b763' } } },
+                            // { value: 8, name: '未发布', itemStyle: { normal: { color: '#61b8ff' } } },
+                            // { value: 6, name: '已完成', itemStyle: { normal: { color: '#96d8a8' } } },
+                            // { value: 7, name: '逾期', itemStyle: { normal: { color: '#f5b763' } } },
                         ]
                     }
                 ]
@@ -103,6 +104,7 @@ export default {
                 );
                 //   this.option.series[0].data = array;
                 let _this = this
+                _this.option.series[0].data = array.data
                 _this.option.series[0].label.emphasis = _this.option.series[0].label.formatter = function (params) {
                     console.log(params);
                     var sum = 0;
@@ -118,21 +120,25 @@ export default {
         },
         setJson(array) {
             this.ooption = {
-                xdata: [],
-                sdata: [],
-                max: 0
+                data: []
             }
-
+            this.ooption.data = [
+                { value: array.doing, name: '进行中', itemStyle: { normal: { color: '#3673e8' } } },
+                { value: array.nodo, name: '未进行', itemStyle: { normal: { color: '#b362ff' } } },
+                { value: array.noLook, name: '未发布', itemStyle: { normal: { color: '#61b8ff' } } },
+                { value: array.is, name: '已完成', itemStyle: { normal: { color: '#96d8a8' } } },
+                { value: array.no, name: '逾期', itemStyle: { normal: { color: '#f5b763' } } },
+            ]
             if (!this.chartObj) {
-                this.setChart(array);
+                this.setChart(this.ooption);
             } else {
-                this.option.series[0].data = array;
+                this.option.series[0].data = this.ooption.data;
                 this.chartObj.setOption(this.option);
             }
         }
     },
     watch: {
-        loginArray: {
+        dataJ: {
             immediate: true,
             deep: true,
             handler(newValue, oldValue) {
@@ -142,7 +148,7 @@ export default {
         },
     },
     mounted() {
-        this.setJson(this.loginArray)
+        this.setJson(this.dataJ)
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 31 - 15
src/components/pages/test/data/randar1.vue

@@ -9,7 +9,7 @@
 <script>
 export default {
     props: {
-        loginArray: {
+        typeJArray: {
             type: Array
         },
     },
@@ -24,11 +24,11 @@ export default {
                 tooltip: {},
                 radar: {
                     indicator: [
-                        { name: '煜煜星光', max: 100 },
-                        { name: '个人写真', max: 100 },
-                        { name: '明灯导航', max: 100 },
-                        { name: '教师耕耘', max: 100 },
-                        { name: '其他', max: 100 }
+                        // { name: '煜煜星光', max: 100 },
+                        // { name: '个人写真', max: 100 },
+                        // { name: '明灯导航', max: 100 },
+                        // { name: '教师耕耘', max: 100 },
+                        // { name: '其他', max: 100 }
                     ],
                     axisName: {
                         color: '#000',
@@ -44,7 +44,7 @@ export default {
                         type: 'radar',
                         data: [
                             {
-                                value: [86, 76, 35, 85, 80, 86],
+                                value: [],
                                 itemStyle: {
                                     color: '#3673E8' // 设置数据点的颜色
                                 },
@@ -77,6 +77,8 @@ export default {
                     this.$el.querySelector("#charts_canvas")
                 );
                 //   this.option.series[0].data = array;
+                this.option.radar.indicator = array.indicator;
+                this.option.series[0].data[0].value = array.data;
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
@@ -84,21 +86,35 @@ export default {
         },
         setJson(array) {
             this.ooption = {
-                xdata: [],
-                sdata: [],
-                max: 0
+                indicator: [],
+                max: 100,
+                data:[]
+            }
+            // this.ooption.data = [];
+            // Math.ceil(100 / 100) * 100
+            for(var i=0;i<array.length;i++){
+                this.ooption.data.push(array[i].zcount)
+                this.ooption.max = this.ooption.max > array[i].zcount ? this.ooption.max : array[i].zcount
+                this.ooption.indicator.push(
+                    { name: array[i].name },
+                )
+            }
+            this.ooption.max = Math.ceil(this.ooption.max / 100) * 100
+            for(var i = 0;i<this.ooption.indicator.length;i++){
+                this.ooption.indicator[i].max = this.ooption.max
             }
-
+            
             if (!this.chartObj) {
-                this.setChart(array);
+                this.setChart(this.ooption);
             } else {
-                this.option.series[0].data = array;
+                this.option.radar.indicator = this.ooption.indicator;
+                this.option.series[0].data[0].value = this.ooption.data;
                 this.chartObj.setOption(this.option);
             }
         }
     },
     watch: {
-        loginArray: {
+        typeJArray: {
             immediate: true,
             deep: true,
             handler(newValue, oldValue) {
@@ -108,7 +124,7 @@ export default {
         },
     },
     mounted() {
-        this.setJson(this.loginArray)
+        this.setJson(this.typeJArray)
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 66 - 45
src/components/pages/test/data/randar2.vue

@@ -9,7 +9,7 @@
 <script>
 export default {
     props: {
-        loginArray: {
+        typeJArray: {
             type: Array
         },
     },
@@ -21,48 +21,64 @@ export default {
                 type: [],
             },
             option: {
-                tooltip: {},
-                radar: {
-                    indicator: [
-                        { name: '煜煜星光', max: 100 },
-                        { name: '个人写真', max: 100 },
-                        { name: '明灯导航', max: 100 },
-                        { name: '教师耕耘', max: 100 },
-                        { name: '其他', max: 100 }
-                    ],
-                    axisName: {
-                        color: '#000'
-                    },
-                    axisName: {
-                        color: '#000',
-                        fontSize: 12
-                    },
-                    radius: ['0%', '70%'],
-                    center: ['50%', '55%'],
-                    nameGap: 5,
+                xAxis: {
+                    type: 'category',
+                    data: [],
+                    axisLabel: {
+                        interval: 0,
+                        formatter: function (value) {
+                            var result = '';
+                            for (var i = 0; i < value.length; i += 2) {
+                            result += value.substr(i, 2) + '\n';
+                            }
+                            return result;
+                        }
+                    }
+                },
+                yAxis: {
+                    type: 'value',
+                    minInterval: 1,
+                },
+                tooltip: {
+                    trigger: 'axis',
+                    axisPointer: {
+                        type: 'shadow'
+                    }
+                },
+                grid: {
+                    left: '30',
+                    right: '20',
+                    bottom: '30',
+                    top: '20',
+                    // containLabel: true
                 },
                 series: [
                     {
-                        name: '综合平均分',
-                        type: 'radar',
-                        data: [
-                            {
-                                value: [86, 76, 35, 85, 80, 86],
-                                itemStyle: {
-                                    color: '#F5B763' // 设置数据点的颜色
-                                },
-                                lineStyle: {
-                                    normal: {
-                                        color: '#F5B763' // 
-                                    }
-                                },
-                                areaStyle: {
-                                    normal: {
-                                        color: '#F5B76333' // 
-                                    }
-                                }
+                        data: [],
+                        type: 'bar',
+                        label: {
+                            show: true,
+                            position: 'top'
+                        },
+                        itemStyle: {
+                            color: function (params) {
+                                var colorList = [
+                                    '#3673e8',
+                                    '#61b8ff',
+                                    '#96d8a8',
+                                    '#f5b763',
+                                    '#fd9588',
+                                    '#c23531',
+                                    '#2f4554',
+                                    '#61a0a8',
+                                    '#d48265',
+                                    '#91c7ae',
+                                    '#749f83',
+                                    '#ca8622'
+                                ];
+                                return colorList[params.dataIndex];
                             }
-                        ]
+                        }
                     }
                 ]
             },
@@ -80,6 +96,8 @@ export default {
                     this.$el.querySelector("#charts_canvas")
                 );
                 //   this.option.series[0].data = array;
+                this.option.series[0].data = this.ooption.sdata;
+                this.option.xAxis.data = this.ooption.xdata;
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);
@@ -89,19 +107,22 @@ export default {
             this.ooption = {
                 xdata: [],
                 sdata: [],
-                max: 0
             }
-
+            for (let i = 0; i < array.length; i++) {
+                this.ooption.xdata.push(array[i].name);
+                this.ooption.sdata.push(array[i].kcount);
+            }
             if (!this.chartObj) {
-                this.setChart(array);
+                this.setChart(this.ooption);
             } else {
-                this.option.series[0].data = array;
+                this.option.series[0].data = this.ooption.sdata;
+                this.option.xAxis.data = this.ooption.xdata;
                 this.chartObj.setOption(this.option);
             }
         }
     },
     watch: {
-        loginArray: {
+        typeJArray: {
             immediate: true,
             deep: true,
             handler(newValue, oldValue) {
@@ -111,7 +132,7 @@ export default {
         },
     },
     mounted() {
-        this.setJson(this.loginArray)
+        this.setJson(this.typeJArray)
         var _this = this;
         window.addEventListener("resize", () => {
             if (_this.chartObj) {

+ 194 - 58
src/components/pages/test/index.vue

@@ -24,19 +24,20 @@
             <span class="active">个人总览</span>
         </div>
         <div class="bbox">
-            <div class="test_data_box">
+            <div class="test_data_box" v-loading="isLoadingData">
                 <div class="data_box">
                     <div class="left">
                         <div class="title">表单状态总览</div>
                         <div class="box">
-                            <span class="color1">{{ 10 }}个进行中</span>
-                            <span class="color2">{{ 8 }}个未发布</span>
-                            <span class="color3">{{ 6 }}个已完成</span>
-                            <span class="color4">{{ 7 }}个逾期</span>
+                            <span class="color1">{{ dataJ.doing }}个进行中</span>
+                            <span class="color5">{{ dataJ.nodo }}个未进行</span>
+                            <span class="color2">{{ dataJ.noLook }}个未发布</span>
+                            <span class="color3">{{ dataJ.is }}个已完成</span>
+                            <span class="color4">{{ dataJ.no }}个逾期</span>
                         </div>
                     </div>
                     <div class="right">
-                        <pie-1></pie-1>
+                        <pie-1 :dataJ="dataJ"></pie-1>
                     </div>
                 </div>
                 <div class="data_box">
@@ -53,33 +54,33 @@
                         <pie-2></pie-2>
                     </div>
                 </div>
-                <div class="data_box">
+                <div class="data_box" v-if="typeArray.length">
                     <div class="left">
                         <div class="title">综合平均分</div>
                         <div class="box2">
-                            <span>{{ 85 }}</span>
+                            <span>{{ zscore.toFixed(0) }}</span>
                         </div>
                     </div>
                     <div class="right">
-                        <randar-1></randar-1>
+                        <randar-1 :typeJArray="typeJArray"></randar-1>
                     </div>
                 </div>
-                <div class="data_box">
-                    <div class="left">
-                        <div class="title">逾期情况</div>
-                        <div class="box2">
+                <div class="data_box" v-if="typeArray.length" style="flex-direction: column;">
+                    <div class="left" style="height: fit-content;text-align: left;width: 100%;">
+                        <div class="title" style="margin: 0;">逾期情况</div>
+                        <!-- <div class="box2">
                             <span>{{ 12 }}%</span>
-                        </div>
+                        </div> -->
                     </div>
-                    <div class="right">
-                        <randar-2></randar-2>
+                    <div class="right" style="height: calc(100% - 20px);">
+                        <randar-2 :typeJArray="typeJArray"></randar-2>
                     </div>
                 </div>
             </div>
             <div class="search_nav">
                 <div class="right">
                     <span :class="{ active: stype == 1 }" @click="checkDataType(1)">按问卷查看</span>
-                    <span :class="{active: stype == 2}" @click="checkDataType(2)">按人员查看</span>
+                    <span :class="{ active: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
                 </div>
                 <div class="left">
                     <span class="list" :class="{ active: stype2 == 1 }" @click="checkStype2(1)"></span>
@@ -150,11 +151,12 @@
                                 <span><span>截止日期</span></span><span>{{ item.overtime ? item.overtime : '未设置' }}</span>
                             </div>
                             <div class="test_time">
-                                <span><span>填写范围</span></span><el-tooltip :content="item.juriP ? item.juriP : '所有人'" placement="top" effect="dark">
+                                <span><span>填写范围</span></span><el-tooltip :content="item.juriP ? item.juriP : '所有人'"
+                                    placement="top" effect="dark">
                                     <!-- content to trigger tooltip here -->
                                     <span>{{ item.juriP ? item.juriP : '所有人' }}</span>
                                 </el-tooltip>
-                                
+
                             </div>
                             <div class="test_time tset_type" v-if="typeArray.length">
                                 <span><span>类型</span></span>
@@ -229,18 +231,16 @@
                     </el-table-column>
                     <el-table-column label="操作" width="350px">
                         <template slot-scope="scope">
-                            <el-button @click="goToCourse2(scope.row.courseId)" type="text" size="small"
-                                v-if="((scope.row.userid == userid) ||
-                                    (scope.row.course_teacher &&
+                            <el-button @click="goToCourse2(scope.row.courseId)" type="text" size="small" v-if="((scope.row.userid == userid) ||
+                                (scope.row.course_teacher &&
                                     scope.row.course_teacher.indexOf(userid) !== -1) || role == '1')">编辑</el-button>
                             <el-button @click="checkToTest(scope.row.courseId)" type="text" size="small">查看</el-button>
                             <el-button @click="copyTest(scope.row.courseId)" type="text" size="small">复制</el-button>
                             <el-button @click="shareTest(scope.row)" type="text" size="small">提醒</el-button>
                             <el-button @click="deleteCourse(scope.row.courseId)" type="text" size="small"
-                                style="color: #EE3E3E;"
-                                v-if="((scope.row.userid == userid) ||
+                                style="color: #EE3E3E;" v-if="((scope.row.userid == userid) ||
                                     (scope.row.course_teacher &&
-                                    scope.row.course_teacher.indexOf(userid) !== -1) || role == '1')">删除</el-button>
+                                        scope.row.course_teacher.indexOf(userid) !== -1) || role == '1')">删除</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -259,7 +259,8 @@
                                 <span><span>已完成表单</span></span><span>{{ item.testCount }}</span>
                             </div>
                             <div class="test_time">
-                                <span><span>教研室</span></span><el-tooltip :content="item.className ? item.className : '无'" placement="top" effect="dark">
+                                <span><span>教研室</span></span><el-tooltip :content="item.className ? item.className : '无'"
+                                    placement="top" effect="dark">
                                     <!-- content to trigger tooltip here -->
                                     <span>{{ item.className ? item.className : '无' }}</span>
                                 </el-tooltip>
@@ -383,7 +384,7 @@ import randar2 from "./data/randar2.vue";
 import shareBox from './shareBox/index.vue'
 export default {
     name: 'test',
-    components: { EditorBar, CourseProblem, pie1, pie2, randar1, randar2,shareBox },
+    components: { EditorBar, CourseProblem, pie1, pie2, randar1, randar2, shareBox },
     data() {
         return {
             itemCount: 1,
@@ -391,6 +392,7 @@ export default {
             courseText: "",
             courseTime: "",
             isLoading: false,
+            isLoadingData: false,
             fileList: [],
             fileList1: [],
             homeworkList: [{ name: "" }],
@@ -432,17 +434,19 @@ export default {
             typeCheck: "",
             stype: 1,
             stype2: 1,
-            scid:{},
-            dialogVisibleShare:false,
+            scid: {},
+            dialogVisibleShare: false,
             page2: 1,
             total2: 0,
             pageSize2: 20,
             course2: [],
-            
+            dataJ: {},
+            typeJArray:[],
+            zscore: 0
         };
     },
     methods: {
-        random(){
+        random() {
             return Math.random().toString(36).substr(2);
         },
         tableRowClassName2({ row, rowIndex }) {
@@ -539,7 +543,7 @@ export default {
                 this.role
             );
         },
-        checkToTest2(uid){
+        checkToTest2(uid) {
             this.$router.push(
                 "/checkToTest2?uid=" +
                 uid +
@@ -609,7 +613,7 @@ export default {
             this.page = val;
             this.getCourse();
         },
-        handleCurrentChange2(val){
+        handleCurrentChange2(val) {
             this.page2 = val
             this.getCourse2();
         },
@@ -653,12 +657,12 @@ export default {
             }
         },
         searchCourse() {
-            if(this.stype == 1){
+            if (this.stype == 1) {
                 this.page = 1
-                this.getCourse(); 
-            }else if(this.stype == 2){
+                this.getCourse();
+            } else if (this.stype == 2) {
                 this.page2 = 1
-                this.getCourse2(); 
+                this.getCourse2();
             }
         },
         clear() {
@@ -668,12 +672,12 @@ export default {
                 }
             }
             this.typeCheck = ''
-            if(this.stype == 1){
+            if (this.stype == 1) {
                 this.page = 1
-                this.getCourse(); 
-            }else if(this.stype == 2){
+                this.getCourse();
+            } else if (this.stype == 2) {
                 this.page2 = 1
-                this.getCourse2(); 
+                this.getCourse2();
             }
         },
         getCourse() {
@@ -730,12 +734,14 @@ export default {
                     this.isLoading = false;
                     this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
                     this.course = res.data[0];
+
                 })
                 .catch((err) => {
+                    this.isLoading = false;
                     console.error(err);
                 });
         },
-        getCourse2(){
+        getCourse2() {
             this.isLoading = true;
             let params = {
                 oid: this.oid,
@@ -753,9 +759,130 @@ export default {
                     this.course2 = res.data[0];
                 })
                 .catch((err) => {
+                    this.isLoading = false;
+                    console.error(err);
+                });
+        },
+        getData() {
+            let params = {
+                oid: this.oid,
+                org: this.org,
+            };
+            this.ajax
+                .get(this.$store.state.api + "testDataBoard", params)
+                .then((res) => {
+                    this.isLoadingData = false;
+                    let test = res.data[0]
+                    let work = res.data[1]
+                    let dataJ = {
+                        doing: 0,
+                        nodo: 0,
+                        noLook: 0,
+                        is: 0,
+                        no: 0
+                    }
+                    for (var i = 0; i < test.length; i++) {
+                        if (test[i].look == '1') {
+                            dataJ.noLook++
+                        }
+
+                        let now = new Date().getTime()
+                        let isTime = test[i].over_at && new Date(test[i].over_at).getTime()
+                        if (test[i].over_at && test[i].look == '2' && now > isTime) {
+                            dataJ.no++
+                        }
+
+                        if (((test[i].over_at && test[i].look == '2' && isTime > now) || (!test[i].over_at && test[i].look == '2')) && test[i].isWorkCount > 0) {
+                            dataJ.doing++
+                        }
+
+
+                        if (((test[i].over_at && test[i].look == '2' && isTime > now) || (!test[i].over_at && test[i].look == '2')) && test[i].isWorkCount == 0) {
+                            dataJ.nodo++
+                        }
+                    }
+                    this.dataJ = dataJ
+
+                    if (this.typeArray.length) {
+                        let typeJ = {}
+                        for (var i = 0; i < this.typeArray.length; i++) {
+                            typeJ[this.typeArray[i].id] = {
+                                name: this.typeArray[i].name,
+                                count: 0,
+                                scroe: 0,
+                                zcount: 0,
+                                kcount: 0
+                            }
+                        }
+                        typeJ['qita'] = {
+                                name: '其他',
+                                count: 0,
+                                scroe: 0,
+                                zcount: 0,
+                                kcount: 0
+                            }
+                        for(var i = 0; i < work.length; i++) {
+                            if(work[i].typeid){
+                                let score = this.getScore(work[i].courseJson)
+                                typeJ[work[i].typeid].count++
+                                typeJ[work[i].typeid].scroe+=score
+                            }else{
+                                let score = this.getScore(work[i].courseJson)
+                                typeJ['qita'].count++
+                                typeJ['qita'].scroe+=score
+                            }
+                        }
+                        let typeJArray = Object.values(typeJ)
+                        let zscore = 0
+                        for(var i = 0; i < typeJArray.length; i++){
+                            typeJArray[i].zcount = typeJArray[i].scroe ? Math.round(typeJArray[i].scroe/typeJArray[i].count) : 0
+                            zscore += typeJArray[i].zcount
+                        }
+                        this.zscore = zscore ? zscore / typeJArray.length : 0
+                        for(var i = 0; i < test.length; i++){
+                            let now = new Date().getTime()
+                            let isTime = test[i].over_at && new Date(test[i].over_at).getTime()
+                            if (test[i].over_at && test[i].look == '2' && now > isTime && test[i].typeid) {
+                                typeJ[test[i].typeid].kcount++
+                            }else if (test[i].over_at && test[i].look == '1' && now > isTime) {
+                                typeJ['qita'].kcount++
+                            }
+                        }
+                        this.typeJArray = typeJArray
+                    }
+
+                })
+                .catch((err) => {
+                    this.isLoadingData = false;
                     console.error(err);
                 });
         },
+        getScore(courseJson) {
+            // let _array = JSON.parse(array)
+            let _score = 0;
+            let _array = JSON.parse(courseJson);
+            for (var j = 0; j < _array.length; j++) {
+                let el = _array[j];
+                if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                    for (var k = 0; k < el.array.length; k++) {
+                        let item = el.array[k];
+                        if (item.ttype == 2 && item.array.length > 0) {
+                            for (var z = 0; z < item.array.length; z++) {
+                                let item2 = item.array[z];
+                                if (item2.ttype == 1 && item2.json && item2.json.score2) {
+                                    _score += parseInt(item2.json.score2);
+                                }
+                            }
+                        } else if (item.ttype == 1 && item.json && item.json.score2) {
+                            _score += parseInt(item.json.score2);
+                        }
+                    }
+                } else if (el.ttype == 1 && el.json && el.json.score2) {
+                    _score += parseInt(el.json.score2);
+                }
+            }
+            return _score ? _score : 0;
+        },
         getTypeName() {
             this.$forceUpdate();
             this.page = 1;
@@ -781,7 +908,7 @@ export default {
         //       console.error(err);
         //     });
         // },
-        shareTest(cid){
+        shareTest(cid) {
             this.scid = cid
             this.dialogVisibleShare = true
         },
@@ -876,6 +1003,7 @@ export default {
                 });
         },
         selectTestType() {
+            this.isLoadingData = true
             let params = {
                 oid: this.oid,
             };
@@ -883,6 +1011,7 @@ export default {
                 .get(this.$store.state.api + "selectTestType", params)
                 .then((res) => {
                     this.typeArray = res.data[0];
+                    this.getData()
                 })
                 .catch((err) => {
                     console.error(err);
@@ -990,22 +1119,22 @@ export default {
         checkDataType(type) {
             if (this.stype != type) {
                 this.stype = type
-                if(type == 1){
+                if (type == 1) {
                     this.page = 1
                     this.getCourse()
-                }else{
+                } else {
                     this.page2 = 1
                     this.getCourse2()
                 }
             }
         },
         search() {
-            if(this.stype == 1){
+            if (this.stype == 1) {
                 this.page = 1
-                this.getCourse(); 
-            }else if(this.stype == 2){
+                this.getCourse();
+            } else if (this.stype == 2) {
                 this.page2 = 1
-                this.getCourse2(); 
+                this.getCourse2();
             }
         },
         checkProblem(res) {
@@ -1037,10 +1166,10 @@ export default {
     activated() {
         console.log(1);
         this.selectAllType();
-        if(this.stype == 1){
-            this.getCourse(); 
-        }else if(this.stype == 2){
-            this.getCourse2(); 
+        if (this.stype == 1) {
+            this.getCourse();
+        } else if (this.stype == 2) {
+            this.getCourse2();
         }
         this.selectTestType();
     },
@@ -1051,10 +1180,10 @@ export default {
         }
         this.page = 1;
         this.selectAllType();
-        if(this.stype == 1){
-            this.getCourse(); 
-        }else if(this.stype == 2){
-            this.getCourse2(); 
+        if (this.stype == 1) {
+            this.getCourse();
+        } else if (this.stype == 2) {
+            this.getCourse2();
         }
         this.selectTestType();
     },
@@ -1757,6 +1886,7 @@ export default {
     background-image: url('../../../assets/icon/test/share_test_icon.png');
     margin-right: 20px;
 }
+
 .test_box>.test_btn>.test_o_btn>.delete {
     background-image: url('../../../assets/icon/test/delete_test_icon.png');
 }
@@ -1794,6 +1924,7 @@ export default {
     color: rgb(235, 154, 96);
     background-color: rgba(235, 154, 96, .1);
 }
+
 .sub_head {
     position: relative;
     font-size: 20px;
@@ -2050,6 +2181,10 @@ export default {
     background: #f5b763;
 }
 
+.test_data_box>.data_box>.left>.box>.color5::before {
+    background: #b362ff;
+}
+
 .test_data_box>.data_box>.right {
     /* width: calc(100% - 110px); */
     width: calc(100%);
@@ -2063,5 +2198,6 @@ export default {
 .tableClass {
     width: calc(100% - 20px);
     margin: 0 auto;
-}</style>
+}
+</style>
   

+ 1 - 0
src/components/pages/testPerson/test/test.vue

@@ -288,6 +288,7 @@ export default {
                     }else{
                         this.type = '0';
                     }
+                    this.getWorks()
                 })
                 .catch(err => {
                     console.error(err);

+ 1 - 1
src/components/pages/trainCourse/course.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;">
+  <div class="pb_content" style="height: auto; width: calc(100% - 40px); margin: 10px auto;background: unset;">
     <div style="width:100%;padding:0 21px;background:#fff;border-radius: 5px;box-sizing: border-box;">
       <div class="pb_head top">
         <div style="

部分文件因为文件数量过多而无法显示