瀏覽代碼

结束监考调整

zhangjie 2 年之前
父節點
當前提交
f3825ce437

+ 5 - 0
src/components/CourseSelect.vue

@@ -7,6 +7,7 @@
     :style="styles"
     :style="styles"
     filterable
     filterable
     clearable
     clearable
+    :disabled="disabled"
   >
   >
     <el-option
     <el-option
       v-for="item in optionList"
       v-for="item in optionList"
@@ -32,6 +33,10 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false,
       default: false,
     },
     },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
   },
   },
   data() {
   data() {
     return {
     return {

+ 5 - 0
src/components/ExamSelect.vue

@@ -6,6 +6,7 @@
     :style="styles"
     :style="styles"
     filterable
     filterable
     clearable
     clearable
+    :disabled="disabled"
     @change="select"
     @change="select"
   >
   >
     <el-option
     <el-option
@@ -33,6 +34,10 @@ export default {
         return {};
         return {};
       },
       },
     },
     },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
   },
   },
   data() {
   data() {
     return {
     return {

+ 1 - 1
src/features/examwork/CourseManagement/CourseManagement.vue

@@ -69,7 +69,7 @@
           scope.row.updateTime | datetimeFilter
           scope.row.updateTime | datetimeFilter
         }}</span>
         }}</span>
       </el-table-column>
       </el-table-column>
-      <el-table-column :context="_self" label="操作" width="210" fixed="right">
+      <el-table-column :context="_self" label="操作" width="100" fixed="right">
         <div slot-scope="scope">
         <div slot-scope="scope">
           <el-button size="mini" type="primary" plain @click="edit(scope.row)">
           <el-button size="mini" type="primary" plain @click="edit(scope.row)">
             编辑
             编辑

+ 83 - 73
src/features/examwork/CourseManagement/CoursePaperDialog.vue

@@ -1,20 +1,14 @@
 <template>
 <template>
   <el-dialog
   <el-dialog
     ref="dialog"
     ref="dialog"
+    custom-class="page-dialog"
     title="编辑绑卷"
     title="编辑绑卷"
     width="800px"
     width="800px"
     :visible.sync="visible"
     :visible.sync="visible"
     @close="closeDialog"
     @close="closeDialog"
   >
   >
-    <el-form
-      :model="form"
-      ref="form"
-      :rules="rules"
-      label-position="right"
-      label-width="120px"
-      inline
-    >
-      <el-row>
+    <el-form :model="form" ref="form" :rules="rules" inline>
+      <div class="part-box part-box-form">
         <el-form-item label="批次名称">
         <el-form-item label="批次名称">
           <ExamSelect v-model="course.examId" disabled />
           <ExamSelect v-model="course.examId" disabled />
         </el-form-item>
         </el-form-item>
@@ -25,74 +19,78 @@
             disabled
             disabled
           />
           />
         </el-form-item>
         </el-form-item>
-      </el-row>
-      <el-row>
-        <el-table :data="papers" stripe style="width: 100%;">
-          <el-table-column width="42" />
-          <el-table-column width="100" label="ID">
-            <span slot-scope="scope">{{ scope.row.id }}</span>
-          </el-table-column>
-          <el-table-column label="试卷名称">
-            <span slot-scope="scope">{{ scope.row.name }}</span>
-          </el-table-column>
-          <el-table-column width="100" label="分值">
-            <span slot-scope="scope">{{ scope.row.totalScore }}</span>
-          </el-table-column>
-          <el-table-column width="170" label="抽卷几率">
-            <span slot-scope="scope">
-              <el-input-number
-                v-model.trim="scope.row.weight"
-                :min="0"
-                :step="1"
-                step-strictly
-                :max="100"
-                style="width: 50px;"
-                :controls="false"
-              >
-              </el-input-number>
-              %
-            </span>
-          </el-table-column>
-          <el-table-column width="170" label="音频播放次数">
-            <span slot-scope="scope">
-              <el-input-number
-                :min="1"
-                :max="1000"
-                v-model.trim="scope.row.audioPlayCount"
-              ></el-input-number>
-            </span>
-          </el-table-column>
-        </el-table>
-      </el-row>
-      <el-row>
-        <el-form-item label="客观题小题乱序" prop="objectiveShuffle">
-          <el-radio-group
-            class="pull_right_sm"
-            v-model="refreshCourse.objectiveShuffle"
-          >
-            <el-radio :label="1">启用</el-radio>
-            <el-radio :label="0">禁用</el-radio>
-          </el-radio-group>
+        <el-form-item>
+          <el-button type="primary" @click="toAddPaper">新增绑卷</el-button>
         </el-form-item>
         </el-form-item>
-      </el-row>
+      </div>
+      <el-table :data="papers" stripe style="width: 100%;">
+        <el-table-column label="试卷名称">
+          <span slot-scope="scope">{{ scope.row.name }}</span>
+        </el-table-column>
+        <el-table-column width="100" label="分值">
+          <span slot-scope="scope">{{ scope.row.totalScore }}</span>
+        </el-table-column>
+        <el-table-column width="170" label="抽卷几率">
+          <span slot-scope="scope">
+            <el-input-number
+              v-model.trim="scope.row.weight"
+              :min="0"
+              :step="1"
+              step-strictly
+              :max="100"
+              style="width: 50px;"
+              :controls="false"
+            >
+            </el-input-number>
+            %
+          </span>
+        </el-table-column>
+        <el-table-column width="170" label="音频播放次数">
+          <span slot-scope="scope">
+            <el-input-number
+              v-model.trim="scope.row.audioPlayCount"
+              :min="1"
+              :max="1000"
+              :step="1"
+              step-strictly
+            ></el-input-number>
+          </span>
+        </el-table-column>
+        <el-table-column label="操作" width="100">
+          <div slot-scope="scope">
+            <el-button size="mini" type="danger" plain @click="toDelete(scope)">
+              编辑
+            </el-button>
+          </div>
+        </el-table-column>
+      </el-table>
+
       <el-row>
       <el-row>
-        <el-form-item label="客观题选项乱序" prop="optionShuffle">
-          <el-radio-group
-            class="pull_right_sm"
-            v-model="refreshCourse.optionShuffle"
-          >
-            <el-radio :label="1">启用</el-radio>
-            <el-radio :label="0">禁用</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </el-row>
-      <el-row class="d-flex justify-content-center">
-        <el-button type="primary" @click="submitForm" :loading="loading">
-          保 存
-        </el-button>
-        <el-button @click="closeDialog">取 消</el-button>
+        <el-col :span="12">
+          <el-form-item label="客观题小题乱序" prop="objectiveShuffle">
+            <el-radio-group v-model="refreshCourse.objectiveShuffle">
+              <el-radio :label="1">启用</el-radio>
+              <el-radio :label="0">禁用</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="客观题选项乱序" prop="optionShuffle">
+            <el-radio-group v-model="refreshCourse.optionShuffle">
+              <el-radio :label="1">启用</el-radio>
+              <el-radio :label="0">禁用</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
       </el-row>
       </el-row>
     </el-form>
     </el-form>
+
+    <div slot="footer" class="d-flex justify-content-center">
+      <el-button type="primary" @click="submitForm" :loading="loading">
+        保 存
+      </el-button>
+      <el-button @click="closeDialog">取 消</el-button>
+    </div>
   </el-dialog>
   </el-dialog>
 </template>
 </template>
 
 
@@ -154,6 +152,18 @@ export default {
     closeDialog() {
     closeDialog() {
       this.visible = false;
       this.visible = false;
     },
     },
+    toAddPaper() {
+      this.papers.push({
+        id: null,
+        name: "",
+        totalScore: null,
+        weight: 100,
+        audioPlayCount: 2,
+      });
+    },
+    toDelete({ $index }) {
+      this.papers.splice($index, 1);
+    },
     async submitForm() {
     async submitForm() {
       try {
       try {
         const totalWieght = this.papers
         const totalWieght = this.papers

+ 14 - 12
src/features/invigilation/RealtimeMonitoring/RealtimeMonitoring.vue

@@ -126,11 +126,12 @@
             >手动收卷</el-button
             >手动收卷</el-button
           > -->
           > -->
           <el-button
           <el-button
-            type="danger"
+            v-if="IS_ADMIN"
+            :type="curExamIsOver ? 'success' : 'danger'"
             icon="icon icon-over"
             icon="icon icon-over"
             :disabled="!filter.examId"
             :disabled="!filter.examId"
             @click="finishInvigilationExam"
             @click="finishInvigilationExam"
-            >结束监考</el-button
+            >{{ curExamIsOver ? "恢复监考" : "结束监考" }}</el-button
           >
           >
         </div>
         </div>
       </div>
       </div>
@@ -414,6 +415,7 @@ export default {
         MOBILE_SECOND: "mobileSecondMonitorStatusSource",
         MOBILE_SECOND: "mobileSecondMonitorStatusSource",
       },
       },
       viewingAngles: [],
       viewingAngles: [],
+      IS_ADMIN: this.$store.state.user.roleCodes.includes("ADMIN"),
     };
     };
   },
   },
   created() {
   created() {
@@ -426,6 +428,9 @@ export default {
     isFullScreen() {
     isFullScreen() {
       return this.$store.state.isFullScreen;
       return this.$store.state.isFullScreen;
     },
     },
+    curExamIsOver() {
+      return this.curExamBatch && this.curExamBatch.monitorStatus === "END";
+    },
   },
   },
   watch: {
   watch: {
     isFullScreen: {
     isFullScreen: {
@@ -658,16 +663,13 @@ export default {
       this.getList();
       this.getList();
     },
     },
     async finishInvigilationExam() {
     async finishInvigilationExam() {
-      const result = await this.$confirm(
-        "确定要结束监考吗?",
-        "结束监考确认提醒",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          iconClass: "el-icon-warning",
-          customClass: "el-message-box__error",
-        }
-      ).catch(() => {});
+      const actionName = this.curExamIsOver ? "恢复监考" : "结束监考";
+      const result = await this.$confirm(`确定要${actionName}吗?`, "确认提醒", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        iconClass: "el-icon-warning",
+        customClass: "el-message-box__error",
+      }).catch(() => {});
 
 
       if (!result) return;
       if (!result) return;
 
 

+ 16 - 12
src/features/invigilation/RealtimeMonitoring/RealtimeMonitoringFull.vue

@@ -15,12 +15,13 @@
           <div class="card-box monitor-view-content-right-header">
           <div class="card-box monitor-view-content-right-header">
             <SummaryLineFull data-type="trouble" :examId="filter.examId" />
             <SummaryLineFull data-type="trouble" :examId="filter.examId" />
             <el-button
             <el-button
+              v-if="IS_ADMIN"
               class="finish-invigilation"
               class="finish-invigilation"
-              type="danger"
+              :type="curExamIsOver ? 'success' : 'danger'"
               icon="icon icon-over"
               icon="icon icon-over"
               :disabled="!filter.examId"
               :disabled="!filter.examId"
               @click="finishInvigilationExam"
               @click="finishInvigilationExam"
-              >结束监考</el-button
+              >{{ curExamIsOver ? "恢复监考" : "结束监考" }}</el-button
             >
             >
           </div>
           </div>
           <div class="monitor-view-content-video-table">
           <div class="monitor-view-content-video-table">
@@ -131,6 +132,7 @@ export default {
         pageSize: 24,
         pageSize: 24,
         pageNumber: 1,
         pageNumber: 1,
       },
       },
+      curExamMonitorStatus: "",
       /** 监考视频列表 */
       /** 监考视频列表 */
       dataList: [],
       dataList: [],
       /** 监考视频总数 */
       /** 监考视频总数 */
@@ -156,6 +158,7 @@ export default {
         "transform-origin": "0 0",
         "transform-origin": "0 0",
         transform: "scale(1) translate(-50%)",
         transform: "scale(1) translate(-50%)",
       },
       },
+      IS_ADMIN: this.$store.state.user.roleCodes.includes("ADMIN"),
     };
     };
   },
   },
   mounted() {
   mounted() {
@@ -169,6 +172,9 @@ export default {
     isMobile() {
     isMobile() {
       return this.filter.monitorVideoSource.indexOf("MOBILE") === 0;
       return this.filter.monitorVideoSource.indexOf("MOBILE") === 0;
     },
     },
+    curExamIsOver() {
+      return this.curExamMonitorStatus === "END";
+    },
   },
   },
   watch: {
   watch: {
     isFullScreen: {
     isFullScreen: {
@@ -197,6 +203,7 @@ export default {
     /** filter change */
     /** filter change */
     onFilterChange(filter) {
     onFilterChange(filter) {
       this.filter = Object.assign(this.filter, filter);
       this.filter = Object.assign(this.filter, filter);
+      this.curExamMonitorStatus = filter.monitorStatus;
       this.getList();
       this.getList();
     },
     },
 
 
@@ -234,16 +241,13 @@ export default {
 
 
     /** 结束监考 */
     /** 结束监考 */
     async finishInvigilationExam() {
     async finishInvigilationExam() {
-      const result = await this.$confirm(
-        "确定要结束监考吗?",
-        "结束监考确认提醒",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          iconClass: "el-icon-warning",
-          customClass: "el-message-box__error",
-        }
-      ).catch(() => {});
+      const actionName = this.curExamIsOver ? "恢复监考" : "结束监考";
+      const result = await this.$confirm(`确定要${actionName}吗?`, "确认提醒", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        iconClass: "el-icon-warning",
+        customClass: "el-message-box__error",
+      }).catch(() => {});
 
 
       if (!result) return;
       if (!result) return;
 
 

+ 2 - 0
src/features/invigilation/RealtimeMonitoring/components/RealtimeMonitoringFullHeader.vue

@@ -71,6 +71,7 @@ export default {
         examId: "",
         examId: "",
         roomCode: "",
         roomCode: "",
         monitorVideoSource: "",
         monitorVideoSource: "",
+        monitorStatus: "",
       },
       },
       /** 考场列表 */
       /** 考场列表 */
       examRooms: [],
       examRooms: [],
@@ -109,6 +110,7 @@ export default {
         this.viewingAngles = [];
         this.viewingAngles = [];
       }
       }
       this.filter.examId = examBatch.id;
       this.filter.examId = examBatch.id;
+      this.filter.monitorStatus = examBatch.monitorStatus;
       this.filter.monitorVideoSource = this.viewingAngles?.[0]?.code ?? "";
       this.filter.monitorVideoSource = this.viewingAngles?.[0]?.code ?? "";
     },
     },
     async getExamRooms() {
     async getExamRooms() {

+ 1 - 0
src/features/system/SystemNotice/ModifySystemNotice.vue

@@ -29,6 +29,7 @@
           placeholder="请输入内容"
           placeholder="请输入内容"
           type="textarea"
           type="textarea"
           maxlength="999"
           maxlength="999"
+          :autosize="{ minRows: 4, maxRows: 10 }"
           show-word-limit
           show-word-limit
         ></el-input>
         ></el-input>
       </el-form-item>
       </el-form-item>

+ 4 - 0
src/styles/base.scss

@@ -63,6 +63,10 @@ body {
   background-color: #fff;
   background-color: #fff;
   border-radius: 6px;
   border-radius: 6px;
 
 
+  &-form {
+    padding: 20px 20px 2px;
+  }
+
   &-head {
   &-head {
     margin-bottom: 20px;
     margin-bottom: 20px;
     display: flex;
     display: flex;

+ 14 - 2
src/styles/element-ui-custom.scss

@@ -186,18 +186,27 @@
   border-radius: 10px;
   border-radius: 10px;
   color: #202b4b;
   color: #202b4b;
   .el-dialog__header {
   .el-dialog__header {
-    padding: 16px 20px;
+    padding: 15px 20px;
     border-bottom: 1px solid rgba(240, 244, 249, 1);
     border-bottom: 1px solid rgba(240, 244, 249, 1);
   }
   }
   .el-dialog__body {
   .el-dialog__body {
-    padding: 30px;
+    padding: 20px;
   }
   }
   .el-dialog__footer {
   .el-dialog__footer {
+    padding: 15px 20px;
     .el-button {
     .el-button {
       width: 83px;
       width: 83px;
     }
     }
   }
   }
 }
 }
+.page-dialog {
+  .el-dialog__body {
+    background-color: #f0f4f9;
+  }
+  .el-dialog__footer {
+    background-color: #f0f4f9;
+  }
+}
 
 
 // el-message-box
 // el-message-box
 .el-message-box {
 .el-message-box {
@@ -275,3 +284,6 @@
     color: #202b4b;
     color: #202b4b;
   }
   }
 }
 }
+.el-form--inline .el-form-item__content {
+  vertical-align: middle;
+}