zhangjie 3 سال پیش
والد
کامیت
e9b3dcdb63

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

@@ -64,6 +64,9 @@ export const batchAddExamTask = datas => {
 export const taskApplyAuditHistory = flowId => {
   return $postParam("/api/admin/exam/task/review_list", { flowId });
 };
+export const taskApplySubmitHistory = flowId => {
+  return $postParam("/api/admin/exam/task/submit_list", { flowId });
+};
 export const taskApplyExamObject = paperNumber => {
   return $postParam("/api/admin/exam/task/find_exam_object", { paperNumber });
 };

+ 24 - 11
src/modules/exam/components/ApplyContent.vue

@@ -227,7 +227,11 @@
             prop="setup"
             label="驳回节点:"
           >
-            <el-select v-model="auditModal.setup" placeholder="请选择">
+            <el-select
+              v-model="auditModal.setup"
+              placeholder="请选择"
+              style="width: 100%"
+            >
               <el-option
                 v-for="item in setups"
                 :key="item.taskKey"
@@ -422,7 +426,6 @@ export default {
       task: {},
       reason: "",
       // audit
-      TASK_AUDIT_RESULT: { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" },
       flows: [],
       setups: [],
       auditModal: {
@@ -495,6 +498,14 @@ export default {
         ? this.editType === "AUDIT"
         : this.curTaskApply.setup > 1;
     },
+    IS_PRELAST_STEP() {
+      return this.curTaskApply.setup === this.flows.length - 1;
+    },
+    TASK_AUDIT_RESULT() {
+      return this.IS_PRELAST_STEP
+        ? { PASS: "通过" }
+        : { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" };
+    },
     cardTodoName() {
       let name = "创建答题卡";
       if (this.curTaskApply.cardId) {
@@ -590,6 +601,7 @@ export default {
 
       const flowData = await taskAllFlowSetups(this.curTaskApply.flowId);
       const curSetup = this.curTaskApply.setup;
+      const curStepIsLast = curSetup === flowData.length;
       this.flows = flowData.map(item => {
         item.status =
           curSetup > item.setup
@@ -610,15 +622,16 @@ export default {
 
       const curFlow = this.flows.find(item => item.isCurrent);
       if (curFlow) {
-        this.setups = this.flows
-          .filter(item => item.setup < curFlow.setup)
-          .map(item => {
-            return {
-              taskKey: item.taskKey,
-              setup: item.setup,
-              taskName: item.taskName
-            };
-          });
+        const flows = curStepIsLast
+          ? this.flows.slice(-2, -1)
+          : this.flows.filter(item => item.setup < curFlow.setup);
+        this.setups = flows.map(item => {
+          return {
+            taskKey: item.taskKey,
+            setup: item.setup,
+            taskName: `【${item.taskName}】${item.firstUser}`
+          };
+        });
       }
 
       // 下一节点审批人

+ 49 - 0
src/modules/exam/components/ApplySubmitHistory.vue

@@ -0,0 +1,49 @@
+<template>
+  <div class="apply-submit-history">
+    <div v-if="submitHistory.length">
+      <el-table border :data="submitHistory">
+        <el-table-column prop="operateTime" label="提交日期">
+          <span slot-scope="scope"
+            >{{ scope.row.operateTime | timestampFilter }}
+          </span>
+        </el-table-column>
+        <el-table-column prop="operateName" label="提交人"></el-table-column>
+        <el-table-column prop="reviewStatus" label="下级审核人">
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="history-none" v-else>
+      <p class="tips-info text-center">暂无数据</p>
+    </div>
+  </div>
+</template>
+
+<script>
+import { taskApplySubmitHistory } from "../api";
+
+export default {
+  name: "apply-submit-history",
+  props: {
+    flowId: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      submitHistory: [],
+      latestHistory: null
+    };
+  },
+  mounted() {
+    // this.getData();
+  },
+  methods: {
+    async getData() {
+      if (!this.flowId) return;
+      this.submitHistory = await taskApplySubmitHistory(this.flowId);
+      this.latestHistory = this.submitHistory[0];
+    }
+  }
+};
+</script>

+ 10 - 2
src/modules/exam/components/ModifyTaskApply.vue

@@ -133,6 +133,12 @@
         ref="ApplyAuditHistory"
         :flow-id="modalForm.flowId"
       ></apply-audit-history>
+      <apply-submit-history
+        v-if="needReview"
+        v-show="curMenu.id === '3'"
+        ref="ApplySubmitHistory"
+        :flow-id="modalForm.flowId"
+      ></apply-submit-history>
     </div>
 
     <div slot="footer"></div>
@@ -142,6 +148,7 @@
 <script>
 import ApplyContent from "./ApplyContent";
 import ApplyAuditHistory from "./ApplyAuditHistory";
+import ApplySubmitHistory from "./ApplySubmitHistory";
 import { examRuleDetail } from "../../base/api";
 import { cancelOrRestartTaskApply, taskApplyExamObject } from "../api";
 import { parseTimeRangeDateAndTime } from "@/plugins/utils";
@@ -174,7 +181,7 @@ const initModalForm = {
 
 export default {
   name: "modify-task-apply",
-  components: { ApplyContent, ApplyAuditHistory },
+  components: { ApplyContent, ApplyAuditHistory, ApplySubmitHistory },
   props: {
     instance: {
       type: Object,
@@ -216,7 +223,8 @@ export default {
       examRule: {},
       menus: [
         { id: "1", name: "命题处理", component: "apply-content" },
-        { id: "2", name: "审核意见", component: "apply-audit-history" }
+        { id: "2", name: "审核意见", component: "apply-audit-history" },
+        { id: "3", name: "提交记录", component: "apply-submit-history" }
       ],
       curMenu: {},
       flows: [],