|
@@ -26,7 +26,7 @@
|
|
|
</td>
|
|
|
<td>
|
|
|
<el-button
|
|
|
- v-if="!attachment.isExposed && (IS_APPLY || IS_AUDIT_APPLY)"
|
|
|
+ v-if="!attachment.isExposed && IS_APPLY"
|
|
|
type="text"
|
|
|
class="btn-primary"
|
|
|
@click="toUpload(attachment)"
|
|
@@ -179,7 +179,7 @@
|
|
|
|
|
|
<!-- audit history -->
|
|
|
<div
|
|
|
- v-if="flowHistoryList.length"
|
|
|
+ v-if="flowHistoryList.length && curTaskApply.flowStatus !== 'START'"
|
|
|
class="task-audit-history flow-timeline"
|
|
|
>
|
|
|
<h4 class="mb-4">审核记录:</h4>
|
|
@@ -224,6 +224,24 @@
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ v-if="flowList.length && curTaskApply.flowStatus === 'START'"
|
|
|
+ class="task-audit-history flow-timeline"
|
|
|
+ >
|
|
|
+ <h4 class="mb-4">流程:</h4>
|
|
|
+ <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>
|
|
|
|
|
|
<!-- audit -->
|
|
|
<div v-if="IS_AUDIT" class="task-audit">
|
|
@@ -331,13 +349,13 @@
|
|
|
@click="toAuditSubmit"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
v-if="IS_AUDIT_APPLY"
|
|
|
type="primary"
|
|
|
:disabled="isSubmit"
|
|
|
@click="toAuditApply"
|
|
|
>提交</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
</div>
|
|
|
|
|
@@ -352,8 +370,6 @@
|
|
|
<card-option-dialog
|
|
|
ref="CardOptionDialog"
|
|
|
:data="task"
|
|
|
- @upload-sample-over="initData"
|
|
|
- @draft-task="silentSave"
|
|
|
@confirm="cardConfirm"
|
|
|
></card-option-dialog>
|
|
|
<!-- image-preview -->
|
|
@@ -365,11 +381,14 @@
|
|
|
></simple-image-preview>
|
|
|
<!-- select-user-dialog -->
|
|
|
<select-user-dialog
|
|
|
+ v-if="IS_AUDIT"
|
|
|
ref="SelectUserDialog"
|
|
|
:user-limit-count="1"
|
|
|
:users="exchangeUsers"
|
|
|
@modified="exchangeUserSelected"
|
|
|
></select-user-dialog>
|
|
|
+ <!-- ModifyCard -->
|
|
|
+ <modify-card ref="ModifyCard" @modified="cardModified"></modify-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -390,12 +409,14 @@ import {
|
|
|
import { attachmentPreview } from "../../login/api";
|
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
|
import SelectUserDialog from "../../base/components/SelectUserDialog";
|
|
|
+import ModifyCard from "../../card/components/ModifyCard";
|
|
|
import { CARD_SOURCE_TYPE, TASK_AUDIT_RESULT } from "@/constants/enumerate";
|
|
|
import {
|
|
|
taskFlowDetail,
|
|
|
taskFlowApproverExchange,
|
|
|
taskFlowNodeInfo,
|
|
|
- taskFlowApprover
|
|
|
+ taskFlowApprover,
|
|
|
+ flowDetailByFlowId
|
|
|
} from "../../base/api";
|
|
|
|
|
|
const initTaskApply = {
|
|
@@ -414,6 +435,7 @@ const initTaskApply = {
|
|
|
exposedPaperType: "",
|
|
|
// 流程
|
|
|
flowId: "",
|
|
|
+ flowStatus: "",
|
|
|
setup: 0,
|
|
|
// 工作台任务id
|
|
|
flowTaskId: "",
|
|
@@ -433,7 +455,8 @@ export default {
|
|
|
UploadPaperDialog,
|
|
|
CardOptionDialog,
|
|
|
SimpleImagePreview,
|
|
|
- SelectUserDialog
|
|
|
+ SelectUserDialog,
|
|
|
+ ModifyCard
|
|
|
},
|
|
|
props: {
|
|
|
examTask: {
|
|
@@ -462,7 +485,8 @@ export default {
|
|
|
reason: "",
|
|
|
TASK_AUDIT_RESULT: { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" },
|
|
|
// audit
|
|
|
- flows: [],
|
|
|
+ flowList: [],
|
|
|
+ flowInfo: {},
|
|
|
auditModal: {
|
|
|
approvePass: "PASS",
|
|
|
setup: "",
|
|
@@ -532,14 +556,7 @@ export default {
|
|
|
const IS_COMMON_AUDIT = this.editType
|
|
|
? this.editType === "AUDIT"
|
|
|
: this.curTaskApply.setup > 1;
|
|
|
- return IS_COMMON_AUDIT && !this.IS_AUDIT_APPLY;
|
|
|
- },
|
|
|
- IS_AUDIT_APPLY() {
|
|
|
- // IS_PRELAST_STEP
|
|
|
- return (
|
|
|
- this.curTaskApply.subFlowReject &&
|
|
|
- this.curTaskApply.setup === this.flows.length - 1
|
|
|
- );
|
|
|
+ return IS_COMMON_AUDIT;
|
|
|
},
|
|
|
cardTodoName() {
|
|
|
let name = "创建答题卡";
|
|
@@ -610,7 +627,11 @@ export default {
|
|
|
? JSON.parse(this.curTaskApply.paperConfirmAttachmentIds)
|
|
|
: [];
|
|
|
|
|
|
- this.getFlowHistory();
|
|
|
+ if (this.curTaskApply.flowStatus === "START") {
|
|
|
+ this.getFlowList();
|
|
|
+ } else {
|
|
|
+ this.getFlowHistory();
|
|
|
+ }
|
|
|
|
|
|
if (this.IS_AUDIT) this.getRejectSetupList();
|
|
|
},
|
|
@@ -649,6 +670,19 @@ export default {
|
|
|
attachments: []
|
|
|
});
|
|
|
},
|
|
|
+ async getFlowList() {
|
|
|
+ if (!this.curTaskApply.flowId) return;
|
|
|
+ const data = await flowDetailByFlowId(this.curTaskApply.flowId);
|
|
|
+ if (!data) return;
|
|
|
+ this.flowInfo = {
|
|
|
+ customFlowId: data.id,
|
|
|
+ version: data.version
|
|
|
+ };
|
|
|
+ this.flowList = data.flowTaskResultList || [];
|
|
|
+ if (this.flowList.length) {
|
|
|
+ this.flowList[0].type = "success";
|
|
|
+ }
|
|
|
+ },
|
|
|
async getRejectSetupList() {
|
|
|
const data = await taskFlowNodeInfo(this.curTaskApply.flowTaskId);
|
|
|
this.rejectSetupList = (data && data.rejectSetupList) || [];
|
|
@@ -731,16 +765,8 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
toEditCard() {
|
|
|
- this.cachePrepareTcpCard();
|
|
|
- this.$router.push({
|
|
|
- name: "CardEdit",
|
|
|
- params: {
|
|
|
- cardId: this.curTaskApply.cardId
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- cachePrepareTcpCard() {
|
|
|
this.$ls.set("prepareTcPCard", {
|
|
|
+ cardId: this.task.cardId,
|
|
|
examTaskId: this.task.examTaskId,
|
|
|
courseCode: this.task.courseCode,
|
|
|
courseName: this.task.courseName,
|
|
@@ -749,6 +775,7 @@ export default {
|
|
|
type: "CUSTOM",
|
|
|
createMethod: "STANDARD"
|
|
|
});
|
|
|
+ this.$refs.ModifyCard.open();
|
|
|
},
|
|
|
async toCreateOrViewCard() {
|
|
|
await this.silentSave();
|
|
@@ -780,7 +807,25 @@ export default {
|
|
|
window.open(data.url);
|
|
|
},
|
|
|
cardConfirm(data) {
|
|
|
- this.curTaskApply = this.$objAssign(this.curTaskApply, data);
|
|
|
+ const { makeMethod } = data;
|
|
|
+
|
|
|
+ if (makeMethod === "CUST") {
|
|
|
+ this.silentSave();
|
|
|
+ this.curTaskApply = this.$objAssign(this.curTaskApply, data);
|
|
|
+ } else if (makeMethod === "SELECT") {
|
|
|
+ this.curTaskApply = this.$objAssign(this.curTaskApply, data);
|
|
|
+ } else {
|
|
|
+ this.$ls.set("prepareTcPCard", data);
|
|
|
+ this.$refs.ModifyCard.open();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async cardModified(cardId) {
|
|
|
+ if (!cardId) return;
|
|
|
+ this.curTaskApply = this.$objAssign(this.curTaskApply, {
|
|
|
+ cardId,
|
|
|
+ makeMethod: "SELF"
|
|
|
+ });
|
|
|
+ this.silentSave();
|
|
|
},
|
|
|
async changeCreateCardType() {
|
|
|
const h = this.$createElement;
|
|
@@ -795,7 +840,6 @@ export default {
|
|
|
)
|
|
|
]),
|
|
|
showCancelButton: true,
|
|
|
-
|
|
|
type: "warning"
|
|
|
}).catch(() => {});
|
|
|
if (result !== "confirm") return;
|