Browse Source

流程接口调试

zhangjie 3 years ago
parent
commit
122a93861a

+ 27 - 1
src/assets/styles/pages.scss

@@ -51,8 +51,10 @@
   .task-audit {
   .task-audit {
     padding-top: 15px;
     padding-top: 15px;
     border-top: 2px dashed $--color-border;
     border-top: 2px dashed $--color-border;
-    margin-top: 30px;
+    margin-top: 20px;
   }
   }
+  // .task-audit-history {
+  // }
 
 
   .image-item {
   .image-item {
     display: inline-block;
     display: inline-block;
@@ -179,7 +181,26 @@
       margin-bottom: 30px;
       margin-bottom: 30px;
     }
     }
   }
   }
+}
+// flow-timeline
+.flow-timeline {
+  margin-top: 10px;
+  padding: 15px;
+  border: 1px solid $--color-text-gray-6;
+  border-radius: 10px;
+  background-color: $--color-text-gray-7;
+  .el-timeline {
+    padding: 0 10px;
+  }
+
   .flow-item {
   .flow-item {
+    &-time {
+      color: #909399;
+      line-height: 1;
+      font-size: 13px;
+      margin-bottom: 8px;
+      padding-top: 4px;
+    }
     &-title {
     &-title {
       font-size: 16px;
       font-size: 16px;
       line-height: 1;
       line-height: 1;
@@ -187,9 +208,14 @@
     }
     }
     &-desc {
     &-desc {
       color: $--color-text-gray;
       color: $--color-text-gray;
+
+      > span:not(:first-child) {
+        margin-left: 10px;
+      }
     }
     }
   }
   }
 }
 }
+
 // wait-task
 // wait-task
 .wait-task {
 .wait-task {
   .wait-module {
   .wait-module {

+ 8 - 0
src/constants/enumerate.js

@@ -114,6 +114,14 @@ export const FLOW_TYPE = {
   PAPER_ELECTRON_FLOW: "题库试卷审核"
   PAPER_ELECTRON_FLOW: "题库试卷审核"
 };
 };
 
 
+export const FLOW_APPROVE_OPERATION_TYPE = {
+  SUBMIT: "提交",
+  APPROVE: "审批",
+  EXCHANGE: "转他人审批",
+  REJECT: "驳回",
+  END: "终止"
+};
+
 // 命题 -------------->
 // 命题 -------------->
 // 待办任务警告时间
 // 待办任务警告时间
 export const TASK_WARNING_TIME = 3 * 24 * 60 * 60 * 1000;
 export const TASK_WARNING_TIME = 3 * 24 * 60 * 60 * 1000;

+ 15 - 4
src/modules/base/api.js

@@ -169,9 +169,6 @@ export const updateCourseSimple = datas => {
 export const flowListPage = datas => {
 export const flowListPage = datas => {
   return $postParam("/api/admin/custom/flow/list", datas);
   return $postParam("/api/admin/custom/flow/list", datas);
 };
 };
-export const flowPublish = id => {
-  return $post("/api/admin/custom/flow/publish", { id });
-};
 export const flowEnd = flowId => {
 export const flowEnd = flowId => {
   return $post("/api/admin/custom/flow/end", { flowId });
   return $post("/api/admin/custom/flow/end", { flowId });
 };
 };
@@ -193,7 +190,21 @@ export const flowDetail = id => {
 export const flowDetailByType = (type = "ELECTRON_FLOW") => {
 export const flowDetailByType = (type = "ELECTRON_FLOW") => {
   return $postParam("/api/admin/custom/flow/get_flow_info_by_type", { type });
   return $postParam("/api/admin/custom/flow/get_flow_info_by_type", { type });
 };
 };
-
+export const taskFlowDetail = flowId => {
+  return $postParam("/api/admin/custom/flow/view", { flowId });
+};
+export const taskFlowNodeInfo = taskId => {
+  return $postParam("/api/admin/custom/flow/task/info", { taskId });
+};
+export const taskFlowApproverExchange = ({ taskId, userId }) => {
+  return $postParam("/api/admin/custom/flow/task/approver/exchange", {
+    taskId,
+    userId
+  });
+};
+export const taskFlowApprover = datas => {
+  return $post("/api/admin/custom/flow/task/approve", datas);
+};
 // approve-record
 // approve-record
 export const approveRecordListPage = datas => {
 export const approveRecordListPage = datas => {
   return $postParam("/api/admin/custom/flow/approve/list", datas);
   return $postParam("/api/admin/custom/flow/approve/list", datas);

+ 2 - 10
src/modules/exam/api.js

@@ -109,6 +109,7 @@ export const updateTaskApply = datas => {
 export const cancelOrRestartTaskApply = ({ id, status }) => {
 export const cancelOrRestartTaskApply = ({ id, status }) => {
   return $post("/api/admin/exam/task/apply_status", { id, status });
   return $post("/api/admin/exam/task/apply_status", { id, status });
 };
 };
+// exam-flow
 export const taskAllFlowSetups = flowId => {
 export const taskAllFlowSetups = flowId => {
   return $postParam("/api/admin/flow/task/all", { flowId });
   return $postParam("/api/admin/flow/task/all", { flowId });
 };
 };
@@ -118,12 +119,7 @@ export const taskAllApproverPeople = ({ taskId, courseCode }) => {
     courseCode
     courseCode
   });
   });
 };
 };
-export const taskApproverExchange = ({ taskId, userId }) => {
-  return $postParam("/api/admin/flow/task/approver/exchange", {
-    taskId,
-    userId
-  });
-};
+
 export const taskAllApproverExchangePeople = ({ taskId, realName }) => {
 export const taskAllApproverExchangePeople = ({ taskId, realName }) => {
   return $postParam("/api/admin/flow/task/approver/exchange/people", {
   return $postParam("/api/admin/flow/task/approver/exchange/people", {
     taskId,
     taskId,
@@ -157,10 +153,6 @@ export const taskReviewUnauditedListPage = datas => {
 export const taskReviewAuditedListPage = datas => {
 export const taskReviewAuditedListPage = datas => {
   return $postParam("/api/admin/exam/task/review_list_audited", datas);
   return $postParam("/api/admin/exam/task/review_list_audited", datas);
 };
 };
-export const updateTaskReview = datas => {
-  // return $post("/api/admin/exam/task/review_save", datas);
-  return $post("/api/admin/flow/task/approve", datas);
-};
 export const taskAuditApply = datas => {
 export const taskAuditApply = datas => {
   return $post("/api/admin/exam/task/apply_resave", datas);
   return $post("/api/admin/exam/task/apply_resave", datas);
 };
 };

+ 120 - 117
src/modules/exam/components/ApplyContent.vue

@@ -177,30 +177,42 @@
         <p v-else>暂无</p>
         <p v-else>暂无</p>
       </div>
       </div>
 
 
-      <!--  -->
-      <div v-if="IS_APPLY && needSetApproveUser" class="task-audit">
-        <el-form>
-          <el-form-item label="指定审批人:">
-            <el-select
-              v-model="approveUserIds"
-              placeholder="请选择"
-              multiple
-              filterable
-              clearable
-              style="width: 700px"
-            >
-              <el-option
-                v-for="user in approveUserList"
-                :key="user.id"
-                :value="user.id"
-                :label="`${user.realName}(${user.orgName})`"
-              >
-                {{ user.realName }}({{ user.orgName }})
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
+      <!-- audit history -->
+      <div
+        v-if="flowHistoryList.length"
+        class="task-audit-history flow-timeline"
+      >
+        <h4 class="mb-4">审核记录:</h4>
+        <el-timeline>
+          <el-timeline-item
+            v-for="flow in flowHistoryList"
+            :key="flow.stepKey"
+            :type="flow.type"
+            hide-timestamp
+            size="large"
+            placement="top"
+          >
+            <div class="flow-item">
+              <p v-if="flow.createTime" class="flow-item-time">
+                {{ flow.createTime | timestampFilter }}
+              </p>
+              <h4 class="flow-item-title">{{ flow.approveUserName }}</h4>
+              <p class="flow-item-desc">
+                <span
+                  :class="{
+                    'color-danger': flow.approveOperation === 'REJECT'
+                  }"
+                  >{{
+                    flow.approveOperation | flowApproveOperationTypeFilter
+                  }}</span
+                >
+                <span>{{ flow.approveRemark }}</span>
+              </p>
+            </div>
+          </el-timeline-item>
+        </el-timeline>
       </div>
       </div>
+
       <!-- audit -->
       <!-- audit -->
       <div v-if="IS_AUDIT" class="task-audit">
       <div v-if="IS_AUDIT" class="task-audit">
         <el-form
         <el-form
@@ -233,7 +245,7 @@
               style="width: 100%"
               style="width: 100%"
             >
             >
               <el-option
               <el-option
-                v-for="item in setups"
+                v-for="item in rejectSetupList"
                 :key="item.taskKey"
                 :key="item.taskKey"
                 :value="item.setup"
                 :value="item.setup"
                 :label="item.taskName"
                 :label="item.taskName"
@@ -265,61 +277,26 @@
             prop="userId"
             prop="userId"
             label="审批人:"
             label="审批人:"
           >
           >
-            <el-select
-              v-model="auditModal.userId"
-              filterable
-              placeholder="请选择"
+            <el-tag
+              v-for="user in exchangeUsers"
+              :key="user.id"
+              :disable-transitions="false"
+              size="medium"
             >
             >
-              <el-option
-                v-for="user in approveExchangePeople"
-                :key="user.id"
-                :value="user.id"
-                :label="user.realName"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item
-            v-if="needSetApproveUser && auditModal.approvePass === 'PASS'"
-            key="approveUserIds"
-            label="指定审批人:"
-          >
-            <el-select
-              v-model="approveUserIds"
-              placeholder="请选择"
-              multiple
-              filterable
-              clearable
-              style="width: 700px"
+              {{ user.name }}
+            </el-tag>
+            <el-button
+              class="ml-2"
+              size="mini"
+              type="primary"
+              @click="toSelectExchangeUser"
+              >选择用户</el-button
             >
             >
-              <el-option
-                v-for="user in approveUserList"
-                :key="user.id"
-                :value="user.id"
-                :label="`${user.realName}(${user.orgName})`"
-              >
-                {{ user.realName }}({{ user.orgName }})
-              </el-option>
-            </el-select>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
       </div>
       </div>
     </div>
     </div>
 
 
-    <div class="part-box part-box-pad part-box-border">
-      <el-timeline>
-        <el-timeline-item
-          v-for="flow in flowList"
-          :key="flow.taskKey"
-          :type="flow.type"
-        >
-          <div class="flow-item">
-            <h4 class="flow-item-title">{{ flow.taskName }}</h4>
-            <p class="flow-item-desc">{{ flow.approveUserNames }}</p>
-          </div>
-        </el-timeline-item>
-      </el-timeline>
-    </div>
-
     <div class="task-action">
     <div class="task-action">
       <el-button
       <el-button
         v-if="IS_APPLY"
         v-if="IS_APPLY"
@@ -374,6 +351,13 @@
       @on-next="toNextImage"
       @on-next="toNextImage"
       ref="SimpleImagePreview"
       ref="SimpleImagePreview"
     ></simple-image-preview>
     ></simple-image-preview>
+    <!-- select-user-dialog -->
+    <select-user-dialog
+      ref="SelectUserDialog"
+      :user-limit-count="1"
+      :users="exchangeUsers"
+      @modified="exchangeUserSelected"
+    ></select-user-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -383,18 +367,24 @@ import CardOptionDialog from "./CardOptionDialog";
 import {
 import {
   taskApplyDetail,
   taskApplyDetail,
   updateTaskApply,
   updateTaskApply,
-  updateTaskReview,
+  // updateTaskReview,
   taskAuditApply,
   taskAuditApply,
-  switchCardCreateMethod,
+  switchCardCreateMethod
   // taskAllFlowSetups,
   // taskAllFlowSetups,
   // taskAllApproverPeople,
   // taskAllApproverPeople,
-  taskAllApproverExchangePeople,
-  taskApproverExchange
+  // taskAllApproverExchangePeople,
   // taskApproverNextPeople
   // taskApproverNextPeople
 } from "../api";
 } from "../api";
 import { attachmentPreview } from "../../login/api";
 import { attachmentPreview } from "../../login/api";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
+import SelectUserDialog from "../../base/components/SelectUserDialog";
 import { CARD_SOURCE_TYPE, TASK_AUDIT_RESULT } from "@/constants/enumerate";
 import { CARD_SOURCE_TYPE, TASK_AUDIT_RESULT } from "@/constants/enumerate";
+import {
+  taskFlowDetail,
+  taskFlowApproverExchange,
+  taskFlowNodeInfo,
+  taskFlowApprover
+} from "../../base/api";
 
 
 const initTaskApply = {
 const initTaskApply = {
   examTaskId: "",
   examTaskId: "",
@@ -426,7 +416,12 @@ const initTaskApply = {
 
 
 export default {
 export default {
   name: "apply-content",
   name: "apply-content",
-  components: { UploadPaperDialog, CardOptionDialog, SimpleImagePreview },
+  components: {
+    UploadPaperDialog,
+    CardOptionDialog,
+    SimpleImagePreview,
+    SelectUserDialog
+  },
   props: {
   props: {
     examTask: {
     examTask: {
       type: Object,
       type: Object,
@@ -455,11 +450,11 @@ export default {
       TASK_AUDIT_RESULT: { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" },
       TASK_AUDIT_RESULT: { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" },
       // audit
       // audit
       flows: [],
       flows: [],
-      setups: [],
       auditModal: {
       auditModal: {
         approvePass: "PASS",
         approvePass: "PASS",
         setup: "",
         setup: "",
-        remark: ""
+        remark: "",
+        userId: ""
       },
       },
       auditRules: {
       auditRules: {
         approvePass: [
         approvePass: [
@@ -501,8 +496,9 @@ export default {
           }
           }
         ]
         ]
       },
       },
-      approveExchangePeople: [],
-      flowList: [],
+      flowHistoryList: [],
+      rejectSetupList: [],
+      exchangeUsers: [],
       // image-preview
       // image-preview
       curImage: {},
       curImage: {},
       curImageIndex: 0
       curImageIndex: 0
@@ -569,6 +565,7 @@ export default {
         this.examTask.source
         this.examTask.source
       );
       );
       this.curTaskApply = this.$objAssign(initTaskApply, data || {});
       this.curTaskApply = this.$objAssign(initTaskApply, data || {});
+      this.curTaskApply.examId = this.examTask.examId;
       this.curTaskApply.examTaskId = this.examTask.id;
       this.curTaskApply.examTaskId = this.examTask.id;
       this.curTaskApply.courseCode = this.examTask.courseCode;
       this.curTaskApply.courseCode = this.examTask.courseCode;
       this.curTaskApply.courseName = this.examTask.courseName;
       this.curTaskApply.courseName = this.examTask.courseName;
@@ -594,35 +591,48 @@ export default {
         ? JSON.parse(this.curTaskApply.paperConfirmAttachmentIds)
         ? JSON.parse(this.curTaskApply.paperConfirmAttachmentIds)
         : [];
         : [];
 
 
-      this.buildSteps();
+      this.getFlowHistory();
 
 
-      if (this.IS_AUDIT) this.getExchangeApproverPeople();
+      if (this.IS_AUDIT) this.getRejectSetupList();
     },
     },
-    async buildSteps() {
+    async getFlowHistory() {
       if (
       if (
         !this.curTaskApply.flowId ||
         !this.curTaskApply.flowId ||
         (this.curTaskApply.setup !== null && this.curTaskApply.setup <= 0)
         (this.curTaskApply.setup !== null && this.curTaskApply.setup <= 0)
       ) {
       ) {
         return;
         return;
       }
       }
+      const data = await taskFlowDetail(
+        this.curTaskApply.flowId
+      ).catch(() => {});
+      if (!data) return;
 
 
-      // TODO:获取流程节点
-    },
-    async getExchangeApproverPeople() {
-      const data = await taskAllApproverExchangePeople({
-        taskId: this.curTaskApply.flowTaskId
-      });
+      const FLOW_STATUS = {
+        SUBMIT: "success",
+        APPROVE: "success",
+        EXCHANGE: "success",
+        REJECT: "danger",
+        END: "success"
+      };
 
 
-      this.approveExchangePeople =
-        (data &&
-          data.approveUserList &&
-          data.approveUserList[0] &&
-          data.approveUserList[0].approveUser) ||
-        [];
-      const userId = this.$ls.get("user", { id: "" }).id;
-      this.approveExchangePeople = this.approveExchangePeople.filter(
-        user => user.id !== userId
-      );
+      this.flowHistoryList = data.tfFlowViewLogResultList.map(item => {
+        item.type = FLOW_STATUS[item.approveOperation];
+        return item;
+      });
+      const flowIsEnd = data.currFlowTaskResult.taskKey === "end";
+      this.flowHistoryList.push({
+        type: flowIsEnd ? "success" : null,
+        stepKey: this.$randomCode(),
+        approveSetup: data.currFlowTaskResult.setup, //审批人节点
+        approveRemark: data.currFlowTaskResult.taskName, //审批信息
+        approveOperation: flowIsEnd ? "END" : "",
+        approveUserName: data.currFlowTaskResult.approveUserNames, //审批人
+        createTime: null
+      });
+    },
+    async getRejectSetupList() {
+      const data = await taskFlowNodeInfo(this.curTaskApply.flowTaskId);
+      this.rejectSetupList = (data && data.rejectSetupList) || [];
     },
     },
     approvePassChange() {
     approvePassChange() {
       this.auditRules.remark[0].required =
       this.auditRules.remark[0].required =
@@ -779,6 +789,14 @@ export default {
       this.curTaskApply.makeMethod = "";
       this.curTaskApply.makeMethod = "";
       this.curTaskApply.cardId = "";
       this.curTaskApply.cardId = "";
     },
     },
+    toSelectExchangeUser() {
+      this.$refs.SelectUserDialog.open();
+    },
+    exchangeUserSelected(users) {
+      console.log(users);
+      this.exchangeUsers = users;
+      this.auditModal.userId = users[0].id;
+    },
     getTaskData() {
     getTaskData() {
       let data = { ...this.curTaskApply };
       let data = { ...this.curTaskApply };
       data.paperType = this.paperAttachments.map(item => item.name).join(",");
       data.paperType = this.paperAttachments.map(item => item.name).join(",");
@@ -788,7 +806,6 @@ export default {
       data.paperConfirmAttachmentIds = JSON.stringify(
       data.paperConfirmAttachmentIds = JSON.stringify(
         this.paperConfirmAttachments
         this.paperConfirmAttachments
       );
       );
-      if (this.needSetApproveUser) data.approveUserIds = this.approveUserIds;
       return data;
       return data;
     },
     },
     checkDataValid() {
     checkDataValid() {
@@ -818,11 +835,6 @@ export default {
         return;
         return;
       }
       }
 
 
-      if (this.needSetApproveUser && !this.approveUserIds.length) {
-        this.$message.error("请指定审批人!");
-        return;
-      }
-
       return true;
       return true;
     },
     },
     async toSave() {
     async toSave() {
@@ -864,15 +876,6 @@ export default {
       const valid = await this.$refs.auditModalComp.validate().catch(() => {});
       const valid = await this.$refs.auditModalComp.validate().catch(() => {});
       if (!valid) return;
       if (!valid) return;
 
 
-      if (
-        this.auditModal.approvePass === "PASS" &&
-        this.needSetApproveUser &&
-        !this.approveUserIds.length
-      ) {
-        this.$message.error("请指定审批人!");
-        return;
-      }
-
       const actionName = this.TASK_AUDIT_RESULT[this.auditModal.approvePass];
       const actionName = this.TASK_AUDIT_RESULT[this.auditModal.approvePass];
       const result = await this.$confirm(
       const result = await this.$confirm(
         `确定${actionName}该申请吗?`,
         `确定${actionName}该申请吗?`,
@@ -888,14 +891,14 @@ export default {
           taskId: this.curTaskApply.flowTaskId,
           taskId: this.curTaskApply.flowTaskId,
           userId: this.auditModal.userId
           userId: this.auditModal.userId
         };
         };
-        const data = await taskApproverExchange(datas).catch(() => {});
+        const data = await taskFlowApproverExchange(datas).catch(() => {});
         if (!data) return;
         if (!data) return;
       } else {
       } else {
         let datas = { ...this.auditModal };
         let datas = { ...this.auditModal };
         datas.taskId = this.curTaskApply.flowTaskId;
         datas.taskId = this.curTaskApply.flowTaskId;
         if (this.auditModal.approvePass === "PASS")
         if (this.auditModal.approvePass === "PASS")
           datas.approveUserIds = this.approveUserIds;
           datas.approveUserIds = this.approveUserIds;
-        const data = await updateTaskReview(datas).catch(() => {});
+        const data = await taskFlowApprover(datas).catch(() => {});
         if (!data) return;
         if (!data) return;
       }
       }
 
 

+ 3 - 1
src/modules/exam/components/CardOptionDialog.vue

@@ -104,6 +104,7 @@ import { CARD_SOURCE_TYPE, COMMON_CARD_RULE_ID } from "@/constants/enumerate";
 import UploadFileView from "@/components/UploadFileView";
 import UploadFileView from "@/components/UploadFileView";
 
 
 const initModalForm = {
 const initModalForm = {
+  examId: "",
   examTaskId: "",
   examTaskId: "",
   paperType: "",
   paperType: "",
   courseCode: "",
   courseCode: "",
@@ -217,7 +218,8 @@ export default {
       const data = await cardForSelectList({
       const data = await cardForSelectList({
         courseCode: this.modalForm.courseCode,
         courseCode: this.modalForm.courseCode,
         paperType: this.modalForm.paperType,
         paperType: this.modalForm.paperType,
-        cardRuleId: this.modalForm.cardRuleId
+        cardRuleId: this.modalForm.cardRuleId,
+        examId: this.modalForm.examId
       });
       });
       this.cards = data || [];
       this.cards = data || [];
     },
     },

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

@@ -82,38 +82,14 @@
       </table>
       </table>
     </div>
     </div>
 
 
-    <div class="mb-4 tab-btns" v-if="needReview">
-      <el-button
-        v-for="item in menus"
-        :key="item.id"
-        size="medium"
-        :type="item.id == curMenu.id ? 'primary' : 'default'"
-        @click="selectMenu(item)"
-        >{{ item.name }}</el-button
-      >
-    </div>
-    <div v-if="modalIsShow">
-      <apply-content
-        v-show="curMenu.id === '1'"
-        ref="ApplyContent"
-        :exam-task="modalForm"
-        :edit-type="editType"
-        @cancel="cancel"
-        @modified="modified"
-      ></apply-content>
-      <apply-audit-history
-        v-if="needReview"
-        v-show="curMenu.id === '2'"
-        ref="ApplyAuditHistory"
-        :flow-id="modalForm.flowId"
-      ></apply-audit-history>
-      <apply-submit-history
-        v-if="needReview"
-        v-show="curMenu.id === '3'"
-        ref="ApplySubmitHistory"
-        :exam-task="modalForm"
-      ></apply-submit-history>
-    </div>
+    <apply-content
+      v-if="modalIsShow"
+      ref="ApplyContent"
+      :exam-task="modalForm"
+      :edit-type="editType"
+      @cancel="cancel"
+      @modified="modified"
+    ></apply-content>
 
 
     <div slot="footer"></div>
     <div slot="footer"></div>
   </el-dialog>
   </el-dialog>
@@ -121,14 +97,13 @@
 
 
 <script>
 <script>
 import ApplyContent from "./ApplyContent";
 import ApplyContent from "./ApplyContent";
-import ApplyAuditHistory from "./ApplyAuditHistory";
-import ApplySubmitHistory from "./ApplySubmitHistory";
 import { examRuleDetail } from "../../base/api";
 import { examRuleDetail } from "../../base/api";
 import { cancelOrRestartTaskApply, taskApplyExamObject } from "../api";
 import { cancelOrRestartTaskApply, taskApplyExamObject } from "../api";
 import { parseTimeRangeDateAndTime } from "@/plugins/utils";
 import { parseTimeRangeDateAndTime } from "@/plugins/utils";
 
 
 const initModalForm = {
 const initModalForm = {
   id: null,
   id: null,
+  examId: "",
   courseCode: "",
   courseCode: "",
   courseName: "",
   courseName: "",
   specialty: "",
   specialty: "",
@@ -155,7 +130,7 @@ const initModalForm = {
 
 
 export default {
 export default {
   name: "modify-task-apply",
   name: "modify-task-apply",
-  components: { ApplyContent, ApplyAuditHistory, ApplySubmitHistory },
+  components: { ApplyContent },
   props: {
   props: {
     instance: {
     instance: {
       type: Object,
       type: Object,
@@ -193,14 +168,7 @@ export default {
     return {
     return {
       modalIsShow: false,
       modalIsShow: false,
       modalForm: {},
       modalForm: {},
-      needReview: false,
       examRule: {},
       examRule: {},
-      menus: [
-        { id: "1", name: "命题处理", component: "apply-content" },
-        { id: "2", name: "审核意见", component: "apply-audit-history" },
-        { id: "3", name: "提交记录", component: "apply-submit-history" }
-      ],
-      curMenu: {},
       examRoomInfoList: [],
       examRoomInfoList: [],
       printTotalCount: 0
       printTotalCount: 0
     };
     };
@@ -212,7 +180,6 @@ export default {
     async getExamRule() {
     async getExamRule() {
       const examRule = await examRuleDetail();
       const examRule = await examRuleDetail();
       this.examRule = examRule || {};
       this.examRule = examRule || {};
-      this.needReview = examRule && examRule.review;
     },
     },
     initData(val) {
     initData(val) {
       this.modalForm = this.$objAssign(initModalForm, val);
       this.modalForm = this.$objAssign(initModalForm, val);
@@ -222,8 +189,6 @@ export default {
     },
     },
     visibleChange() {
     visibleChange() {
       this.initData(this.instance);
       this.initData(this.instance);
-      this.curMenu = this.menus[0];
-
       this.getExamRoomInfo();
       this.getExamRoomInfo();
     },
     },
     async getExamRoomInfo() {
     async getExamRoomInfo() {
@@ -260,9 +225,6 @@ export default {
         })
         })
         .catch(() => {});
         .catch(() => {});
     },
     },
-    selectMenu(item) {
-      this.curMenu = item;
-    },
     modified() {
     modified() {
       this.cancel();
       this.cancel();
       this.$emit("modified");
       this.$emit("modified");

+ 5 - 1
src/plugins/filters.js

@@ -17,7 +17,8 @@ import {
   PRINT_PDF_TYPE,
   PRINT_PDF_TYPE,
   EXAM_TYPE,
   EXAM_TYPE,
   CARD_TYPE,
   CARD_TYPE,
-  CARD_CREATE_METHOD_TYPE
+  CARD_CREATE_METHOD_TYPE,
+  FLOW_APPROVE_OPERATION_TYPE
 } from "../constants/enumerate";
 } from "../constants/enumerate";
 import { formatDate } from "../plugins/utils";
 import { formatDate } from "../plugins/utils";
 
 
@@ -100,3 +101,6 @@ Vue.filter("cardTypeFilter", function(val) {
 Vue.filter("cardCreateMethodTypeFilter", function(val) {
 Vue.filter("cardCreateMethodTypeFilter", function(val) {
   return CARD_CREATE_METHOD_TYPE[val] || DEFAULT_FIELD;
   return CARD_CREATE_METHOD_TYPE[val] || DEFAULT_FIELD;
 });
 });
+Vue.filter("flowApproveOperationTypeFilter", function(val) {
+  return FLOW_APPROVE_OPERATION_TYPE[val] || "";
+});