zhangjie 3 anos atrás
pai
commit
4b2b041d65

+ 3 - 3
src/constants/enumerate.js

@@ -110,9 +110,9 @@ export const EXAM_MODE_TYPE = {
 };
 
 export const FLOW_TYPE = {
-  ELECTRON_FLOW: "电子交卷审核",
-  QUESTION_ELECTRON_FLOW: "题库试题提交审核",
-  PAPER_ELECTRON_FLOW: "题库试卷审核"
+  ELECTRON_FLOW: "电子交卷审核"
+  // QUESTION_ELECTRON_FLOW: "题库试题提交审核",
+  // PAPER_ELECTRON_FLOW: "题库试卷审核"
 };
 
 export const FLOW_APPROVE_OPERATION_TYPE = {

+ 2 - 0
src/modules/base/components/ModifyFlow.vue

@@ -112,6 +112,8 @@ export default {
         this.modalForm = this.$objAssign(initModalForm, val);
       } else {
         this.modalForm = { ...initModalForm };
+        const flowTypes = Object.keys(FLOW_TYPE);
+        if (flowTypes.length === 1) this.modalForm.type = flowTypes[0];
       }
     },
     visibleChange() {

+ 1 - 1
src/modules/base/components/SelectUserDialog.vue

@@ -204,7 +204,7 @@ export default {
     },
     visibleChange() {
       this.filterLabel = "";
-      this.labelChange();
+      this.switchUserType(this.userType);
       this.selectedUsers = this.users.map(user => {
         const luser = this.userList.find(item => item.id === user.id);
         return {

+ 7 - 0
src/modules/base/views/CardManage.vue

@@ -81,6 +81,13 @@
             scope.row.createMethod | cardCreateMethodTypeFilter
           }}</span>
         </el-table-column>
+        <el-table-column prop="status" label="状态">
+          <span
+            :class="{ 'color-danger': scope.row.status !== 'SUBMIT' }"
+            slot-scope="scope"
+            >{{ scope.row.status === "SUBMIT" ? "提交" : "暂存" }}</span
+          >
+        </el-table-column>
         <el-table-column prop="remark" label="备注">
           <span slot-scope="scope">{{
             scope.row.remark | defaultFieldFilter

+ 10 - 3
src/modules/exam/components/CreateTaskApply.vue

@@ -327,6 +327,7 @@ export default {
       modalIsShow: false,
       isSubmit: false,
       flowList: [],
+      flowInfo: {},
       examTask: {},
       needReview: false,
       task: {},
@@ -409,7 +410,6 @@ export default {
   },
   created() {
     this.getExamRule();
-    this.getFlowList();
   },
   methods: {
     async getExamRule() {
@@ -419,7 +419,12 @@ export default {
     },
     async getFlowList() {
       const data = await flowDetailByType();
-      this.flowList = data || [];
+      if (!data) return;
+      this.flowInfo = {
+        customFlowId: data.id,
+        version: data.version
+      };
+      this.flowList = data.flowTaskResultList || [];
       if (this.flowList.length) {
         this.flowList[0].type = "success";
       }
@@ -433,6 +438,7 @@ export default {
       this.paperAttachments = [];
     },
     visibleChange() {
+      if (!this.flowList.length) this.getFlowList();
       this.initData();
     },
     checkData() {
@@ -662,7 +668,8 @@ export default {
       this.getTaskDetailData();
       let datas = {
         examTaskDetail: this.examTaskDetail,
-        examTask: this.examTask
+        examTask: this.examTask,
+        ...this.flowInfo
       };
       const data = await teacherCreateTaskApply(datas).catch(() => {});
       this.isSubmit = false;

+ 10 - 3
src/modules/exam/components/createExamAndPrintTask/CreateExamAndPrintTask.vue

@@ -143,13 +143,13 @@ export default {
       examRule: {},
       infos: {},
       flowList: [],
+      flowInfo: {},
       loading: false,
       dataReady: false
     };
   },
   mounted() {
     this.getExamRule();
-    this.getFlowList();
   },
   methods: {
     async getExamRule() {
@@ -159,7 +159,12 @@ export default {
     },
     async getFlowList() {
       const data = await flowDetailByType();
-      this.flowList = data || [];
+      if (!data) return;
+      this.flowInfo = {
+        customFlowId: data.id,
+        version: data.version
+      };
+      this.flowList = data.flowTaskResultList || [];
       if (this.flowList.length) {
         this.flowList[0].type = "success";
       }
@@ -183,6 +188,7 @@ export default {
     visibleChange() {
       this.dataReady = false;
       this.loading = false;
+      if (!this.flowList.length) this.getFlowList();
       this.initData();
     },
     dataChange(data) {
@@ -281,7 +287,8 @@ export default {
         examDetail: this.infos.printTask
       };
       let datas = {
-        examTaskContent: JSON.stringify(examTaskContent)
+        examTaskContent: JSON.stringify(examTaskContent),
+        ...this.flowInfo
       };
 
       const data = await teacherSubmitTaskApply(datas).catch(() => {});

+ 2 - 0
src/modules/exam/views/TaskApplyManage.vue

@@ -201,11 +201,13 @@
     ></modify-task-apply>
     <!-- CreateTaskApply -->
     <create-task-apply
+      v-if="checkPrivilege('button', 'addTask')"
       ref="CreateTaskApply"
       @modified="taskModified"
     ></create-task-apply>
     <!-- CreateExamAndPrintTask -->
     <create-exam-and-print-task
+      v-if="checkPrivilege('button', 'ExamTaskApplyManage')"
       ref="CreateExamAndPrintTask"
       @modified="taskModified"
     ></create-exam-and-print-task>