Selaa lähdekoodia

feat: 试卷结构可以全部删除

zhangjie 2 kuukautta sitten
vanhempi
commit
21ce60e6b3
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5 3
      src/modules/mark/components/markParam/MarkParamStructure.vue

+ 5 - 3
src/modules/mark/components/markParam/MarkParamStructure.vue

@@ -258,9 +258,7 @@
               >新增小题</el-button
             >
             <el-button
-              :disabled="
-                tableData.length <= 1 || checkSubQuestionHasMarker(scope.row)
-              "
+              :disabled="checkSubQuestionHasMarker(scope.row)"
               class="btn-danger"
               type="text"
               @click="toDeleteSub(scope.row)"
@@ -622,6 +620,10 @@ export default {
       row.intervalScore = Math.min(row.totalScore, row.intervalScore);
     },
     checkData() {
+      if (!this.tableData.length) {
+        this.$message.error("请添加大题");
+        return false;
+      }
       let errorMessages = [];
       this.tableData.forEach((item) => {
         let errorMsg = ``;