Browse Source

feat: 印刷管理

zhangjie 3 tuần trước cách đây
mục cha
commit
42fc388fb1

+ 1 - 0
src/modules/exam/components/createExamAndPrintTask/CreateExamAndPrintTask.vue

@@ -110,6 +110,7 @@ const initExamTask = {
   courseId: "",
   courseCode: "",
   courseName: "",
+  className: "",
   paperNumber: "",
   cardRuleId: "",
   teachingRoomId: "",

+ 12 - 0
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -85,6 +85,18 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="班级:">
+              <el-input
+                v-model.trim="examTask.className"
+                placeholder="请输入班级"
+                :maxlength="50"
+                clearable
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-row v-if="checkPrivilege('button', 'OpenAb', 'TaskApplyManage')">
           <el-col :span="12">
             <el-form-item label="启用AB卷:">

+ 54 - 0
src/modules/exam/components/createExamAndPrintTask/SelectTikuPaperDialog.vue

@@ -74,6 +74,18 @@
         </el-pagination>
       </div>
     </div>
+    <div v-if="showTkTips" class="tips-markedness">
+      <p class="tips-info">
+        请在题库-试卷列表点击生成试卷,检查试卷,确定试卷无误后点击顶部确定按钮
+        <el-button
+          v-if="tkAuth.hasAuth"
+          type="text"
+          class="btn-primary btn-link ml-2"
+          @click="toTk"
+          >点击跳转题库</el-button
+        >
+      </p>
+    </div>
     <div slot="footer">
       <el-button @click="cancel">关闭</el-button>
     </div>
@@ -83,6 +95,7 @@
 <script>
 import json5 from "json5";
 import { tikuPaperListQuery, tikuPaperDetail } from "../../api";
+import { tikuAuth } from "../../../stmms/api";
 
 export default {
   name: "select-tiku-paper-dialog",
@@ -107,6 +120,12 @@ export default {
       size: this.GLOBAL.pageSize,
       total: 0,
       loading: false,
+      // tiku
+      showTkTips: false,
+      tkAuth: {
+        hasAuth: false,
+        role: null,
+      },
     };
   },
   methods: {
@@ -200,6 +219,41 @@ export default {
       this.$emit("confirm", row);
       this.cancel();
     },
+    checkTkAuth() {
+      const user = this.$ls.get("user");
+      const userRoles = user.roleSource.filter(
+        (item) => item.roleSource === "QUESTION_LIBRARY"
+      );
+      if (!userRoles.length) {
+        this.tkAuth.hasAuth = false;
+        return;
+      }
+
+      this.tkAuth.hasAuth = true;
+
+      const stRole = userRoles.find(
+        (item) => item.roleCode === "SUBJECT_TEACHER"
+      );
+      this.tkAuth.role = {
+        ...(stRole ? stRole : userRoles[0]),
+        loginName: user.loginName,
+        realName: user.realName,
+      };
+    },
+    async toTk() {
+      if (this.loading) return;
+      this.loading = true;
+      const data = await tikuAuth({
+        loginName: this.tkAuth.role.loginName,
+        realName: this.tkAuth.role.realName,
+        role: this.tkAuth.role.roleCode,
+        returnUrl: encodeURIComponent(window.location.href),
+      }).catch(() => {});
+      this.loading = false;
+
+      if (!data) return;
+      window.open(data.redirectUrl);
+    },
   },
 };
 </script>

+ 1 - 0
src/modules/exam/components/taskApply/ModifyTaskApply.vue

@@ -69,6 +69,7 @@ const initExamTask = {
   id: null,
   examId: "",
   examName: "",
+  className: "",
   examModel: "",
   category: "",
   semesterId: "",

+ 9 - 0
src/modules/exam/components/taskApply/TaskInfo.vue

@@ -53,6 +53,15 @@
           </el-form-item>
         </el-col>
       </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="班级:">
+            <span>
+              {{ examRoomInfo.className }}
+            </span>
+          </el-form-item>
+        </el-col>
+      </el-row>
     </el-form>
 
     <div v-if="examRoomClassList.length && !IS_MODEL2" class="task-exam-room">

+ 14 - 0
src/modules/print/views/PrintTaskManage.vue

@@ -85,6 +85,14 @@
               clearable
             ></room-select>
           </el-form-item>
+          <el-form-item label="班级:" label-width="55px">
+            <el-input
+              v-model.trim="filter.className"
+              placeholder="请输入班级"
+              :maxlength="50"
+              clearable
+            ></el-input>
+          </el-form-item>
           <el-form-item label="考试日期:">
             <el-date-picker
               v-model="createTime"
@@ -280,6 +288,11 @@
           label="试卷编号"
           width="160"
         ></el-table-column>
+        <el-table-column
+          prop="className"
+          label="班级"
+          width="160"
+        ></el-table-column>
         <el-table-column
           prop="examDate"
           label="考试日期"
@@ -546,6 +559,7 @@ export default {
         examEndTime: "",
         printStartTime: "",
         printEndTime: "",
+        className: "",
       },
       searchfilter: {},
       current: 1,