소스 검색

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

zengyicheng 1 년 전
부모
커밋
090022c287

+ 3 - 2
src/components/pages/test/add/addTest.vue

@@ -25,7 +25,7 @@
                 </div>
                 <div class="step_box" :style="{ width: steps == 2 && '100%' }">
                     <setInfo v-if="steps == 1 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
-                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid" :brief.sync="brief" :juri.sync="juri"></setInfo>
+                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid" :brief.sync="brief" :juri.sync="juri" :overDate.sync="overDate"></setInfo>
                     <editInfo v-if="steps == 2 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
                         :cJson.sync="cJson" @save="save" @publish="publish"></editInfo>
                 </div>
@@ -58,6 +58,7 @@ export default {
             typeid:"",
             brief:"",
             juri:'0',
+            overDate:"2024-11-01",
         }
     },
     watch: {
@@ -239,7 +240,7 @@ export default {
                         this.cJson = JSON.parse(res.data[0][0].chapters);
                         this.title = res.data[0][0].title;
                         this.juri = res.data[0][0].juri ? res.data[0][0].juri : '0';
-
+                        this.overDate = res.data[0][0].overTime ? res.data[0][0].overTime : '';
                         this.see = res.data[0][0].open == 1 ? true : false;
 
                         this.typeid = res.data[0][0].typeid;

+ 26 - 2
src/components/pages/test/add/setInfo/index.vue

@@ -19,13 +19,24 @@
                                     </div>
                                 </div>
                             </div>
-                            <div class="typeBox">
+                            <!-- <div class="typeBox">
                                 <span>权限:</span>
                                 <el-select v-model="sJuri" placeholder="权限" @change="juriChange">
                                     <el-option label="所有人" value="0"></el-option>
                                     <el-option label="老师" value="1"></el-option>
                                     <el-option label="学生" value="2"></el-option>
                                 </el-select>
+                            </div> -->
+                            <div class="typeBox">
+                                <span>截止日期:</span>
+                                <el-date-picker
+                                    v-model="selectedDate"
+                                    type="date"
+                                    :picker-options="pickerOptions"
+                                    @change="DateChange"
+                                    format="yyyy-MM-dd"
+                                    clearable=""
+                                    ></el-date-picker>
                             </div>
                             <div class="typeBox" v-if="typeArray.length">
                                 <span>类型:</span>
@@ -116,6 +127,9 @@ export default {
         },
         juri:{
             type: String
+        },
+        overDate:{
+            type: String
         }
     },
     data() {
@@ -131,7 +145,13 @@ export default {
             typeArray: [],
             typeCheck: '',
             sJuri: '',
-            courseText: ''
+            courseText: '',
+            selectedDate: '',
+            pickerOptions: {
+                disabledDate(time) {
+                return time.getTime() < Date.now(); // 只能选择大于今天的日期
+                },
+            },
         }
     },
     directives: {
@@ -237,6 +257,9 @@ export default {
         juriChange(){
             this.$emit("update:juri", this.sJuri)
         },
+        DateChange(){
+            this.$emit("update:overDate", this.selectedDate)
+        },
         briefChange(){
             this.$emit("update:brief", this.courseText)
         },
@@ -276,6 +299,7 @@ export default {
         this.typeCheck = this.depthCopy(this.typeid)
         this.courseText = this.depthCopy(this.brief)
         this.sJuri = this.depthCopy(this.juri)
+        this.selectedDate = this.depthCopy(this.overDate)
         this.$forceUpdate()
         // this.selectAllType();
         this.selectType();

+ 44 - 6
src/components/pages/test/data/pie1.vue

@@ -35,15 +35,44 @@ export default {
                             borderWidth: 2
                         },
                         label: {
-                            show: false,
+                            show: true,
                             position: 'center',
-                            formatter: '{b}\n{c}'
+                            // formatter: '{b}\n{c}'
+                            fontSize: 20,
+                            rich: {
+                                a: {
+                                    fontSize: 30,
+                                },
+                                b: {
+                                    lineHeight: 20,
+                                    fontSize: 14,
+                                    color: '#00000099'
+                                }
+                            }
+                            // formatter: function (params) {
+                            //     console.log(params);
+                            //     var sum = 0;
+                            //     for (var i = 0; i < params.data.length; i++) {
+                            //         sum += params.data[i].value;
+                            //     }
+                            //     return sum + '\n表单总数';
+                            // }
                         },
                         emphasis: {
                             label: {
                                 show: true,
-                                fontSize: 25,
-                                formatter: '{c}'
+                                fontSize: 20,
+                                rich: {
+                                    a: {
+                                        fontSize: 30,
+                                    },
+                                    b: {
+                                        lineHeight: 20,
+                                        fontSize: 14,
+                                        color: '#00000099'
+                                    }
+                                }
+                                // formatter: '{c}'
                             }
                         },
                         labelLine: {
@@ -73,9 +102,18 @@ export default {
                     this.$el.querySelector("#charts_canvas")
                 );
                 //   this.option.series[0].data = array;
+                let _this = this
+                _this.option.series[0].label.emphasis = _this.option.series[0].label.formatter = function (params) {
+                    console.log(params);
+                    var sum = 0;
+                    for (var i = 0; i < _this.option.series[0].data.length; i++) {
+                        sum += _this.option.series[0].data[i].value;
+                    }
+                    return '{a|' + sum + '}\n{b|表单总数}';
+                }
                 // 初始化雷达图
-                this.chartObj = chartObj;
-                this.chartObj.setOption(this.option);
+                _this.chartObj = chartObj;
+                _this.chartObj.setOption(_this.option);
             });
         },
         setJson(array) {

+ 41 - 4
src/components/pages/test/data/pie2.vue

@@ -35,15 +35,43 @@ export default {
                             borderWidth: 2
                         },
                         label: {
-                            show: false,
+                            show: true,
                             position: 'center',
-                            formatter: '{b}\n{c}'
+                            // formatter: '{b}\n{c}'
+                            fontSize: 20,
+                            rich: {
+                                a: {
+                                    fontSize: 30,
+                                },
+                                b: {
+                                    lineHeight: 20,
+                                    fontSize: 14,
+                                    color: '#00000099'
+                                }
+                            }
+                            // formatter: function (params) {
+                            //     var sum = 0;
+                            //     for (var i = 0; i < params.data.length; i++) {
+                            //         sum += params.data[i].value;
+                            //     }
+                            //     return sum + '\n表单总数';
+                            // }
                         },
                         emphasis: {
                             label: {
                                 show: true,
-                                fontSize: 25,
-                                formatter: '{c}'
+                                fontSize: 20,
+                                rich: {
+                                    a: {
+                                        fontSize: 30,
+                                    },
+                                    b: {
+                                        lineHeight: 20,
+                                        fontSize: 14,
+                                        color: '#00000099'
+                                    }
+                                }
+                                // formatter: '{c}'
                             }
                         },
                         labelLine: {
@@ -73,6 +101,15 @@ export default {
                     this.$el.querySelector("#charts_canvas")
                 );
                 //   this.option.series[0].data = array;
+                let _this = this
+                _this.option.series[0].label.emphasis = _this.option.series[0].label.formatter = function (params) {
+                    console.log(params);
+                    var sum = 0;
+                    for (var i = 0; i < _this.option.series[0].data.length; i++) {
+                        sum += _this.option.series[0].data[i].value;
+                    }
+                    return '{a|' + sum + '}\n{b|表单总数}';
+                }
                 // 初始化雷达图
                 this.chartObj = chartObj;
                 this.chartObj.setOption(this.option);

+ 1 - 1
src/components/pages/test/shareBox/index.vue

@@ -68,7 +68,7 @@ export default {
     },
     data() {
         return {
-            origin: 'https://beta.cloud.cocorobo.cn/',
+            origin: top.origin,
             copyText: ""
         };
     },

+ 4 - 3
src/components/pages/testPerson/test/test.vue

@@ -82,7 +82,7 @@
                         <div class="btn">
                             <!-- <div @click="doTest(item.courseid,item.id)"><span></span><span>编辑</span></div> -->
                             <div @click="doTest2(item.courseid)">
-                                <span></span><span>添加</span>
+                                <span></span><span>提交</span>
                             </div>
                             <!-- <div @click="checkTest(item.courseid,item.id)"><span></span><span>查看</span></div> -->
                             <!-- <div @click="copyTest(item.id)"><span></span><span>复制</span></div> -->
@@ -182,7 +182,7 @@ export default {
                                 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[k];
+                                        let item2 = item.array[z];
                                         if (item2.ttype == 1 && item2.json && item2.json.score2) {
                                             score += parseInt(item2.json.score2);
                                         }
@@ -213,9 +213,10 @@ export default {
                     if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
                         for (var k2 = 0; k2 < el.array.length; k2++) {
                             let item = el.array[k2];
+                            console.log(k2);
                             if (item.ttype == 2 && item.array.length > 0) {
                                 for (var z = 0; z < item.array.length; z++) {
-                                    let item2 = item.array[k2];
+                                    let item2 = item.array[z];
                                     if (
                                         item2.ttype == 1 &&
                                         item2.type == 5 &&

+ 7 - 3
src/components/pages/trainCourse/course.vue

@@ -1688,27 +1688,31 @@ export default {
 }
 
 .sub_head {
+  font-size: 20px;
+  font-weight: bold;
   position: relative;
+  padding: 0 15px;
 }
 
 .sub_head::after {
   content: "";
   width: 100%;
-  background: #5a9cea;
+  background: #3681FC;
   height: 2px;
   position: absolute;
   left: 0;
-  bottom: -10px;
+  bottom: -8px;
 }
 
 .subClick {
   /* font-size: 16px; */
-  font-size: 26px;
+  font-size: 20px;
   cursor: pointer;
   /* margin-left: 17.5px; */
   /* color: #ab582f; */
   /* color: #409eff; */
   color: #999;
+  padding: 0 15px;
 }
 
 .sub_head + .subClick,