zhangjie 5 سال پیش
والد
کامیت
62a11855cc

BIN
public/temps/考务导入模版.xlsx


+ 29 - 2
src/assets/styles/adaptive.scss

@@ -51,6 +51,10 @@
         top: 15px;
         top: 15px;
         right: 5px;
         right: 5px;
       }
       }
+      &-info {
+        top: 15px;
+        right: 30px;
+      }
     }
     }
   }
   }
   .home-breadcrumb {
   .home-breadcrumb {
@@ -60,11 +64,34 @@
     padding: 0 25px;
     padding: 0 25px;
   }
   }
 
 
-  .el-table__header thead {
-    font-size: 14px;
+  .task-detail {
+    .task-title {
+      font-size: 14px;
+      padding: 10px 15px;
+      .el-checkbox__label {
+        font-size: 14px;
+      }
+    }
+    .task-body {
+      padding: 20px 15px;
+
+      .table th {
+        font-size: 14px;
+        padding: 10px;
+      }
+    }
+  }
+  .table {
+    th,
+    td {
+      padding: 10px;
+    }
   }
   }
 
 
   // element
   // element
+  .el-table__header thead {
+    font-size: 14px;
+  }
   .el-button {
   .el-button {
     padding: 10px 15px;
     padding: 10px 15px;
   }
   }

+ 6 - 0
src/assets/styles/card-design.scss

@@ -594,9 +594,15 @@
       left: 230px;
       left: 230px;
       padding: 10px 20px;
       padding: 10px 20px;
       height: 110px;
       height: 110px;
+      .control-right .el-button {
+        width: 90px;
+      }
     }
     }
     .design-steps {
     .design-steps {
       padding: 10px 0 10px;
       padding: 10px 0 10px;
+      .step-item:not(:last-child)::after {
+        width: 160px;
+      }
     }
     }
     .design-body {
     .design-body {
       padding: 140px 30px 30px 250px;
       padding: 140px 30px 30px 250px;

+ 1 - 2
src/assets/styles/card-preview.scss

@@ -378,7 +378,6 @@
         &:first-child {
         &:first-child {
           float: left;
           float: left;
           background-color: #fff;
           background-color: #fff;
-          width: 60px;
           text-align: justify;
           text-align: justify;
 
 
           &::after {
           &::after {
@@ -776,7 +775,7 @@
     line-height: 29px;
     line-height: 29px;
     white-space: nowrap;
     white-space: nowrap;
     overflow: hidden;
     overflow: hidden;
-    text-overflow: ellipsis;
+    // text-overflow: ellipsis;
   }
   }
 }
 }
 // elem-line
 // elem-line

+ 23 - 0
src/assets/styles/home.scss

@@ -96,6 +96,21 @@
     &-icon-right {
     &-icon-right {
       right: 10px;
       right: 10px;
     }
     }
+    &-info {
+      display: block;
+      position: absolute;
+      padding: 0 5px;
+      min-width: 20px;
+      height: 20px;
+      font-size: 14px;
+      line-height: 20px;
+      top: 20px;
+      right: 35px;
+      background-color: $--color-danger;
+      color: #fff;
+      text-align: center;
+      border-radius: 10px;
+    }
   }
   }
 }
 }
 
 
@@ -363,6 +378,14 @@
 .tips-error {
 .tips-error {
   color: $--color-danger;
   color: $--color-danger;
 }
 }
+.tips-icon {
+  display: inline-block;
+  vertical-align: middle;
+  color: $--color-text-secondary;
+  font-size: 18px;
+  margin: 0 10px;
+  cursor: pointer;
+}
 .form-item-content {
 .form-item-content {
   color: $--color-text-regular;
   color: $--color-text-regular;
 }
 }

+ 22 - 1
src/modules/base/components/RuleCard.vue

@@ -66,7 +66,7 @@
       <el-form-item prop="attention" label="注意事项:">
       <el-form-item prop="attention" label="注意事项:">
         <el-input
         <el-input
           type="textarea"
           type="textarea"
-          :rows="4"
+          :rows="5"
           v-model="modalForm.attention"
           v-model="modalForm.attention"
         ></el-input>
         ></el-input>
         <p class="tips-info">提示:换行之后,题卡注意事项会展示为多条内容。</p>
         <p class="tips-info">提示:换行之后,题卡注意事项会展示为多条内容。</p>
@@ -139,6 +139,17 @@ export default {
             required: true,
             required: true,
             message: "请输入注意事项",
             message: "请输入注意事项",
             trigger: "change"
             trigger: "change"
+          },
+          {
+            validator: (rule, value, callback) => {
+              const val = value.replace(/\n/g, "");
+              if (val.length > 200) {
+                callback(new Error("注意事项最多只能输入200个字符"));
+              } else {
+                callback();
+              }
+            },
+            trigger: "change"
           }
           }
         ],
         ],
         objectiveAttention: [
         objectiveAttention: [
@@ -146,6 +157,11 @@ export default {
             required: true,
             required: true,
             message: "请输入客观题注意事项",
             message: "请输入客观题注意事项",
             trigger: "change"
             trigger: "change"
+          },
+          {
+            max: 26,
+            message: "客观题注意事项最多只能输入26个汉字",
+            trigger: "change"
           }
           }
         ],
         ],
         subjectiveAttention: [
         subjectiveAttention: [
@@ -153,6 +169,11 @@ export default {
             required: true,
             required: true,
             message: "请输入主观题注意事项",
             message: "请输入主观题注意事项",
             trigger: "change"
             trigger: "change"
+          },
+          {
+            max: 26,
+            message: "主观题注意事项最多只能输入26个汉字",
+            trigger: "change"
           }
           }
         ]
         ]
       }
       }

+ 4 - 1
src/modules/base/views/UserManage.vue

@@ -77,7 +77,10 @@
         <el-table-column prop="loginName" label="用户名"></el-table-column>
         <el-table-column prop="loginName" label="用户名"></el-table-column>
         <el-table-column prop="name" label="姓名"></el-table-column>
         <el-table-column prop="name" label="姓名"></el-table-column>
         <el-table-column prop="roleName" label="角色"></el-table-column>
         <el-table-column prop="roleName" label="角色"></el-table-column>
-        <el-table-column prop="courseName" label="科目"></el-table-column>
+        <el-table-column
+          prop="courseNameCode"
+          label="科目名称(编码)"
+        ></el-table-column>
         <el-table-column prop="enable" label="状态">
         <el-table-column prop="enable" label="状态">
           <template slot-scope="scope">
           <template slot-scope="scope">
             {{ ABLE_TYPE[scope.row.enable + ""] }}
             {{ ABLE_TYPE[scope.row.enable + ""] }}

+ 24 - 4
src/modules/card/components/elementEdit/cardHeadSpin/HeadStdinfo.vue

@@ -5,7 +5,7 @@
       v-for="(info, index) in data.businessParams"
       v-for="(info, index) in data.businessParams"
       :key="index"
       :key="index"
     >
     >
-      <span>{{ info.name }}</span>
+      <span :style="paramStyle">{{ info.name }}</span>
       <span>:</span>
       <span>:</span>
       <span>{{ fieldInfos[info.field] }}</span>
       <span>{{ fieldInfos[info.field] }}</span>
     </div>
     </div>
@@ -22,10 +22,30 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      fieldInfos: this.data["fieldInfos"] || {}
+      fieldInfos: this.data["fieldInfos"] || {},
+      paramStyle: {},
+      lenWidths: {
+        3: 42,
+        4: 60,
+        5: 70,
+        6: 84,
+        7: 98,
+        8: 112
+      }
     };
     };
   },
   },
-  mounted() {},
-  methods: {}
+  created() {
+    this.init();
+  },
+  methods: {
+    init() {
+      const nameNums = this.data.businessParams.map(item => item.name.length);
+      const maxNameLen = Math.max.apply(null, nameNums);
+      const num = maxNameLen < 3 ? 3 : maxNameLen > 8 ? 8 : maxNameLen;
+      this.paramStyle = {
+        width: this.lenWidths[num] + "px"
+      };
+    }
+  }
 };
 };
 </script>
 </script>

+ 0 - 1
src/modules/card/previewTemp.js

@@ -773,7 +773,6 @@ const css =
   line-height: 29px;\
   line-height: 29px;\
   white-space: nowrap;\
   white-space: nowrap;\
   overflow: hidden;\
   overflow: hidden;\
-  text-overflow: ellipsis;\
 }\
 }\
 \
 \
 .elem-line-horizontal {\
 .elem-line-horizontal {\

+ 8 - 2
src/modules/card/views/CardDesign.vue

@@ -487,9 +487,15 @@ export default {
     },
     },
     registWindowSubmit() {
     registWindowSubmit() {
       window.submitCardTemp = async cardContentTemp => {
       window.submitCardTemp = async cardContentTemp => {
-        await submitCard(this.getCardData(cardContentTemp));
-        this.$message.success("提交成功!");
+        const result = await submitCard(
+          this.getCardData(cardContentTemp)
+        ).catch(() => {});
         this.cardPreviewUrl = "";
         this.cardPreviewUrl = "";
+        if (result) {
+          this.$message.success("提交成功!");
+        } else {
+          this.$message.error("提交失败,请重新尝试!");
+        }
       };
       };
     }
     }
   },
   },

+ 3 - 0
src/modules/exam-center/api.js

@@ -13,6 +13,9 @@ export const saveWaitTask = datas => {
 export const submitWaitTask = datas => {
 export const submitWaitTask = datas => {
   return $post("/api/print/exam/examTask/submit", datas);
   return $post("/api/print/exam/examTask/submit", datas);
 };
 };
+export const waitTaskListCount = () => {
+  return $get("/api/print/exam/examTask/listNotDoneCount", {});
+};
 
 
 // done-task
 // done-task
 export const doneTaskListPage = datas => {
 export const doneTaskListPage = datas => {

+ 1 - 1
src/modules/exam-center/components/BusinessData.vue

@@ -20,7 +20,7 @@
       <el-table-column prop="examRoom" label="考场名称"></el-table-column>
       <el-table-column prop="examRoom" label="考场名称"></el-table-column>
       <el-table-column
       <el-table-column
         prop="courseCodeAndName"
         prop="courseCodeAndName"
-        label="科目名称(ID)"
+        label="科目名称(编码)"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         prop="examTotal"
         prop="examTotal"

+ 25 - 0
src/modules/exam-center/store.js

@@ -0,0 +1,25 @@
+import { waitTaskListCount } from "./api";
+
+const state = {
+  waitTaskCount: 0
+};
+
+const mutations = {
+  setNotDoneTaskCount(state, waitTaskCount) {
+    state.waitTaskCount = waitTaskCount;
+  }
+};
+
+const actions = {
+  async updateWaitTaskCount({ commit }) {
+    const count = await waitTaskListCount();
+    commit("setNotDoneTaskCount", count);
+  }
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions
+};

+ 9 - 7
src/modules/exam-center/views/CardAudit.vue

@@ -231,13 +231,15 @@ export default {
       });
       });
     },
     },
     toPreview(row) {
     toPreview(row) {
-      this.$router.push({
-        name: "CardPreview",
-        params: {
-          cardId: row.cardId,
-          viewType: "view"
-        }
-      });
+      window.open(
+        this.getRouterPath({
+          name: "CardPreview",
+          params: {
+            cardId: row.cardId,
+            viewType: "view"
+          }
+        })
+      );
     }
     }
   }
   }
 };
 };

+ 2 - 2
src/modules/exam-center/views/CardManage.vue

@@ -47,8 +47,8 @@
 
 
     <div class="part-box">
     <div class="part-box">
       <el-table ref="TableList" :data="cards" border stripe>
       <el-table ref="TableList" :data="cards" border stripe>
-        <el-table-column prop="id" label="题卡ID"></el-table-column>
-        <el-table-column label="科目(码)">
+        <el-table-column prop="cardCode" label="题卡ID"></el-table-column>
+        <el-table-column label="科目(码)">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span
             <span
               >{{ scope.row.courseName
               >{{ scope.row.courseName

+ 1 - 1
src/modules/exam-center/views/DoneTask.vue

@@ -29,7 +29,7 @@
       <el-table ref="TableList" :data="tasks" border stripe>
       <el-table ref="TableList" :data="tasks" border stripe>
         <el-table-column prop="id" label="考试ID"></el-table-column>
         <el-table-column prop="id" label="考试ID"></el-table-column>
         <el-table-column prop="examName" label="考试名称"></el-table-column>
         <el-table-column prop="examName" label="考试名称"></el-table-column>
-        <el-table-column prop="courseNameCode" label="科目名称(ID)">
+        <el-table-column prop="courseNameCode" label="科目名称(编码)">
         </el-table-column>
         </el-table-column>
         <el-table-column prop="paperStatus" label="试卷"></el-table-column>
         <el-table-column prop="paperStatus" label="试卷"></el-table-column>
         <el-table-column prop="cardStatus" label="答题卡"></el-table-column>
         <el-table-column prop="cardStatus" label="答题卡"></el-table-column>

+ 22 - 0
src/modules/exam-center/views/ExamModify.vue

@@ -52,6 +52,17 @@
             >{{ val }}</el-radio
             >{{ val }}</el-radio
           >
           >
         </el-radio-group>
         </el-radio-group>
+        <el-popover
+          class="tips-icon"
+          placement="top-start"
+          width="300"
+          trigger="hover"
+        >
+          <p>
+            考试任务备用方式:按照整个考试任务为一个基础单位进行备份的方式;<br />考场备用方式:按照一个考场为一个基础单位进行备份的方式。
+          </p>
+          <i class="el-icon-question" slot="reference"></i>
+        </el-popover>
       </el-form-item>
       </el-form-item>
       <el-form-item prop="backupCard" label="备用各科试卷题卡份数:">
       <el-form-item prop="backupCard" label="备用各科试卷题卡份数:">
         <el-input-number
         <el-input-number
@@ -63,6 +74,17 @@
           step-strictly
           step-strictly
           :controls="false"
           :controls="false"
         ></el-input-number>
         ></el-input-number>
+        <el-popover
+          class="tips-icon"
+          placement="top-start"
+          width="300"
+          trigger="hover"
+        >
+          <p>
+            此处将根据备份方式的不同设置每个科目的试卷及题卡备份份数。
+          </p>
+          <i class="el-icon-question" slot="reference"></i>
+        </el-popover>
       </el-form-item>
       </el-form-item>
       <el-form-item prop="teacher" label="指派命题老师:">
       <el-form-item prop="teacher" label="指派命题老师:">
         <el-table :data="courses" style="width: 420px;" border stripe>
         <el-table :data="courses" style="width: 420px;" border stripe>

+ 1 - 1
src/modules/exam-center/views/ExamRomeDetail.vue

@@ -67,7 +67,7 @@
         <el-table-column prop="examRoom" label="考场名称"></el-table-column>
         <el-table-column prop="examRoom" label="考场名称"></el-table-column>
         <el-table-column
         <el-table-column
           prop="courseCodeAndName"
           prop="courseCodeAndName"
-          label="科目名称(ID)"
+          label="科目名称(编码)"
         ></el-table-column>
         ></el-table-column>
         <el-table-column prop="examTotal" label="应考科次"></el-table-column>
         <el-table-column prop="examTotal" label="应考科次"></el-table-column>
         <el-table-column label="操作" align="center">
         <el-table-column label="操作" align="center">

+ 1 - 1
src/modules/exam-center/views/ExamRomeStudentDetail.vue

@@ -110,7 +110,7 @@
         <el-table-column prop="examRoom" label="考场名称"></el-table-column>
         <el-table-column prop="examRoom" label="考场名称"></el-table-column>
         <el-table-column
         <el-table-column
           prop="courseNameCode"
           prop="courseNameCode"
-          label="科目名称(ID)"
+          label="科目名称(编码)"
           min-width="100"
           min-width="100"
         >
         >
         </el-table-column>
         </el-table-column>

+ 1 - 1
src/modules/exam-center/views/WaitTask.vue

@@ -29,7 +29,7 @@
       <el-table ref="TableList" :data="tasks" border stripe>
       <el-table ref="TableList" :data="tasks" border stripe>
         <el-table-column prop="id" label="考试ID"></el-table-column>
         <el-table-column prop="id" label="考试ID"></el-table-column>
         <el-table-column prop="examName" label="考试名称"></el-table-column>
         <el-table-column prop="examName" label="考试名称"></el-table-column>
-        <el-table-column prop="courseNameCode" label="科目名称(ID)">
+        <el-table-column prop="courseNameCode" label="科目名称(编码)">
         </el-table-column>
         </el-table-column>
         <el-table-column prop="paperStatus" label="试卷"></el-table-column>
         <el-table-column prop="paperStatus" label="试卷"></el-table-column>
         <el-table-column prop="cardStatus" label="答题卡"></el-table-column>
         <el-table-column prop="cardStatus" label="答题卡"></el-table-column>

+ 3 - 0
src/modules/exam-center/views/WaitTaskDetail.vue

@@ -74,6 +74,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapActions } from "vuex";
 import { waitTaskDetail, saveWaitTask, submitWaitTask } from "../api";
 import { waitTaskDetail, saveWaitTask, submitWaitTask } from "../api";
 import UploadPaperDialog from "../components/UploadPaperDialog";
 import UploadPaperDialog from "../components/UploadPaperDialog";
 import CardOptionDialog from "../components/CardOptionDialog";
 import CardOptionDialog from "../components/CardOptionDialog";
@@ -126,6 +127,7 @@ export default {
     this.getData();
     this.getData();
   },
   },
   methods: {
   methods: {
+    ...mapActions("examCenter", ["updateWaitTaskCount"]),
     async getData() {
     async getData() {
       const data = await waitTaskDetail(this.taskId);
       const data = await waitTaskDetail(this.taskId);
       const nameCode = data.courseNameCode.split(/\(|\)/);
       const nameCode = data.courseNameCode.split(/\(|\)/);
@@ -255,6 +257,7 @@ export default {
         await submitWaitTask(this.getTaskData());
         await submitWaitTask(this.getTaskData());
         this.$message.success("提交成功!");
         this.$message.success("提交成功!");
         this.goback();
         this.goback();
+        this.updateWaitTaskCount();
       });
       });
     },
     },
     async toSave() {
     async toSave() {

+ 1 - 1
src/plugins/axios.js

@@ -82,7 +82,7 @@ const errorDataCallback = error => {
  */
  */
 const successCallback = data => {
 const successCallback = data => {
   if (data.code === "200") {
   if (data.code === "200") {
-    return data.data || { success: true };
+    return data.data || data.data === 0 ? data.data : { success: true };
   } else {
   } else {
     throw new Error(errorDataCallback(data));
     throw new Error(errorDataCallback(data));
   }
   }

+ 3 - 1
src/store.js

@@ -5,6 +5,7 @@ Vue.use(Vuex);
 
 
 // modules
 // modules
 import card from "./modules/card/store";
 import card from "./modules/card/store";
+import examCenter from "./modules/exam-center/store";
 
 
 export default new Vuex.Store({
 export default new Vuex.Store({
   state: {
   state: {
@@ -17,6 +18,7 @@ export default new Vuex.Store({
   },
   },
   actions: {},
   actions: {},
   modules: {
   modules: {
-    card
+    card,
+    examCenter
   }
   }
 });
 });

+ 21 - 0
src/views/Home.vue

@@ -69,6 +69,11 @@
                 ]"
                 ]"
               ></i>
               ></i>
             </span>
             </span>
+            <span
+              class="nav-item-info"
+              v-if="nav.router === 'WaitTask' && waitTaskCount"
+              >{{ waitTaskCount }}</span
+            >
           </div>
           </div>
         </li>
         </li>
       </ul>
       </ul>
@@ -143,6 +148,11 @@
                   ]"
                   ]"
                 ></i>
                 ></i>
               </span>
               </span>
+              <span
+                class="nav-item-info"
+                v-if="nav.router === 'WaitTask' && waitTaskCount"
+                >{{ waitTaskCount }}</span
+              >
             </div>
             </div>
           </li>
           </li>
         </ul>
         </ul>
@@ -154,6 +164,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapState, mapActions } from "vuex";
 import localNavs from "@/constants/navs";
 import localNavs from "@/constants/navs";
 import { deepCopy } from "@/plugins/utils";
 import { deepCopy } from "@/plugins/utils";
 import { MENU_ROUTER_DICT } from "@/constants/enumerate";
 import { MENU_ROUTER_DICT } from "@/constants/enumerate";
@@ -180,6 +191,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+    ...mapState("examCenter", ["waitTaskCount"]),
     curNav() {
     curNav() {
       return this.navs[this.curMainIndex];
       return this.navs[this.curMainIndex];
     }
     }
@@ -190,6 +202,7 @@ export default {
     // this.actCurNav();
     // this.actCurNav();
   },
   },
   methods: {
   methods: {
+    ...mapActions("examCenter", ["updateWaitTaskCount"]),
     async getMenus() {
     async getMenus() {
       const data = await sysMenu();
       const data = await sysMenu();
       this.navs = this.menusToTree(data.records);
       this.navs = this.menusToTree(data.records);
@@ -203,9 +216,17 @@ export default {
           this.$router.replace({
           this.$router.replace({
             name: "404"
             name: "404"
           });
           });
+          return;
         }
         }
       }
       }
+
       this.actCurNav();
       this.actCurNav();
+      if (
+        this.validRoutes.includes("WaitTask") &&
+        this.navs[this.curMainIndex].router === "exam-center"
+      ) {
+        this.updateWaitTaskCount();
+      }
     },
     },
     menusToTree(menus) {
     menusToTree(menus) {
       let navTree = deepCopy(localNavs);
       let navTree = deepCopy(localNavs);