Browse Source

2022-10-08 update

1. dataTable组件增加表格分页时, 多选保留的功能
2. 考试详情页, 调整开放人员选择默认为部门人员
3. 考培档案 调整表格显示效果, 及 应考试人数字段不正确的问题
4. 调整试卷新增页, 选择题目后, 单题目分数根据外部每题分数设定
5. 试卷新增页 创建大提时, 同类题型需合并
6. 调整首页 图表显示效果与左侧一致, 并将百分比数据 省略小数
moccus 2 years ago
parent
commit
3b6f4245f7

+ 14 - 1
exam-06173-vue/src/components/DataTable/index.vue

@@ -46,7 +46,7 @@
 
       <el-table-column
         v-if="options.multi"
-        :reserve-selection="false"
+        :reserve-selection="true"
         align="center"
         type="selection"
         width="55"
@@ -145,9 +145,20 @@ export default {
         this.getList()
       },
       deep: true
+    }, // 检测判定弹框类嵌套组件时, 激活时清空表格选择项
+    '$parent.$parent.dialogVisible': {
+      handler(val) {
+        if (val) {
+          this.clearSelection()
+        }
+      },
+      deep: true
     }
   },
   created() {
+    // 创建时 清空选中的所有项
+    this.selectedIds = []
+    this.selectedObjs = []
     this.getList()
   },
   methods: {
@@ -385,6 +396,8 @@ export default {
 
     // 清理选择的
     clearSelection() {
+      this.selectedIds = []
+      this.selectedObjs = []
       this.$refs.table.clearSelection()
     }
 

+ 4 - 4
exam-06173-vue/src/views/admin/exam/exam/form.vue

@@ -224,12 +224,12 @@
                     </el-radio-group>
 
                     <div style="padding-top: 20px">
-                      <div v-if="postForm.openType == 1">
+                      <!-- <div v-if="postForm.openType == 1">
                         <el-alert
                           title="开放的,任何人都可以进行考试!"
                           type="warning"
                         />
-                      </div>
+                      </div> -->
 
                       <div v-if="postForm.openType == 2">
                         <depart-refs
@@ -471,7 +471,7 @@ export default {
         endTime: timeEnd.formatDate("yyyy-MM-dd hh:mm:ss"),
         capture: 0,
         // 开放权限
-        openType: 1,
+        openType: 2,
         // 积分数量
         points: 0,
         // 是否截屏
@@ -523,7 +523,7 @@ export default {
     if (id !== undefined) {
       this.fetchData(id);
     } else {
-      this.postForm.openType = 1;
+      this.postForm.openType = 2;
       this.postForm.joinType = 1;
     }
 

+ 4 - 4
exam-06173-vue/src/views/admin/stat/total/archives.vue

@@ -70,11 +70,11 @@
             <template slot-scope="scope">{{scope.row.pxl}}%</template>
           </el-table-column>
           <el-table-column prop="rjxs" label="人均学时" sortable align="center" >
-            <template slot-scope="scope">{{scope.row.rjxs}}%</template>
+            <template slot-scope="scope">{{scope.row.rjxs}}</template>
           </el-table-column>
           <el-table-column prop="ecTotalMin" sortable label="累计学时" align="center" />
           <el-table-column
-            prop="ecTotalUser"
+            prop="eeTotalUser"
             label="应考试人数"
             align="center"
             sortable
@@ -444,9 +444,9 @@ export default {
             ele['应培训人数'] = ele.ecTotalUser
             ele['实培训人数'] = ele.ecActualUser
             ele['培训率'] = this.renderNumber(ele.ecActualUser, ele.ecTotalUser)
-            ele['人均学时'] = this.renderNumber(ele.ecActualUser, ele.ecTotalMin);
+            ele['人均学时'] = this.renderNumber(ele.ecActualUser, ele.ecTotalMin, true);
             ele['累积学时'] = ele.ecTotalMin
-            ele['应考试人数'] = ele.ecTotalUser
+            ele['应考试人数'] = ele.eeTotalUser
             ele['实考试人数'] = ele.eeActualUser
             ele['考试率'] = this.renderNumber(ele.eeActualUser, ele.eeTotalUser);
             ele['考试合格率'] = this.renderNumber(ele.eePassUser, ele.eeActualUser);

+ 8 - 4
exam-06173-vue/src/views/admin/tmpl/components/Join1Form.vue

@@ -254,6 +254,7 @@ export default {
 
     // 创建新的大题
     createGroup(command) {
+      let index = 0
       const data = {
         anchor: new Date().getTime(),
         title: command.title,
@@ -267,10 +268,13 @@ export default {
         quList: [],
         pathScore: false
       }
-      this.postForm.groupList.push(data)
-
-      const index = this.postForm.groupList.length - 1
-      console.log('index', index)
+      const findIndex = this.postForm.groupList.findIndex(o => o.title === data.title)
+      if (findIndex === -1) {
+        this.postForm.groupList.push(data)
+        index = this.postForm.groupList.length - 1
+      } else {
+        index = findIndex
+      }
       // 默认打开选择
       this.$refs.joinQuList.openSelectQu(index)
     },

+ 1 - 1
exam-06173-vue/src/views/admin/tmpl/components/components/JoinQuList.vue

@@ -251,7 +251,7 @@ export default {
           quType: qu.quType,
           content: qu.content,
           analysis: qu.analysis,
-          score: 0,
+          score: this.postForm.groupList[this.index].perScore || 0,
           answerList: fixedAnswers,
           leftList: qu.leftList,
           rightList: qu.rightList,

+ 8 - 4
exam-06173-vue/src/views/dashboard/index.vue

@@ -333,7 +333,7 @@ export default {
 
         res.data.forEach((ele) => {
           xAxisData.push(tabActive === "bm" ? ele.deptName : ele.realName);
-          pxSeriesData.push(ele.total > 0 ? (ele.passed / ele.total) * 100 : 0);
+          pxSeriesData.push(ele.total > 0 ? ((ele.passed / ele.total) * 100).toFixed(0) : 0);
         });
 
         option = {
@@ -351,6 +351,9 @@ export default {
           xAxis: {
             type: "category",
             data: xAxisData,
+            axisLabel: {
+              rotate: -40,
+            },
           },
           yAxis: {
             type: "value",
@@ -418,7 +421,7 @@ export default {
   flex-wrap: wrap;
 
   .statisticsItem {
-    margin-left: 20px;
+    margin-right: 20px;
     background: #1890ff;
     padding: 5px;
     cursor: pointer;
@@ -483,7 +486,7 @@ export default {
       .el-scrollbar__view {
         display: flex;
         justify-content: space-between;
-        align-items: center;
+        // align-items: center;
         flex-wrap: wrap;
       }
 
@@ -506,6 +509,7 @@ export default {
             width: 50px;
             height: 50px;
             margin-right: 20px;
+            min-width: 50px;
 
             img {
               width: 100%;
@@ -532,7 +536,7 @@ export default {
               color: #666;
               overflow: hidden;
               text-overflow: ellipsis;
-              white-space: nowrap;
+              // white-space: nowrap;
             }
           }
         }