|
@@ -1,227 +1,256 @@
|
|
<template>
|
|
<template>
|
|
<div class="apply-content task-detail">
|
|
<div class="apply-content task-detail">
|
|
- <p class="tips-info tips-dark mb-2">
|
|
|
|
- 提示:多卷型试卷由于会绑定一个答题卡模板,因此试卷结构必须相同。多卷型试卷之间客观题要求试题内容相同,可允许大题内的小题题序不同。
|
|
|
|
- </p>
|
|
|
|
- <div class="task-body">
|
|
|
|
- <div v-if="IS_APPLY" class="mb-2 text-right">
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="el-icon-circle-plus-outline"
|
|
|
|
- @click="addAtachment"
|
|
|
|
- >增加卷型</el-button
|
|
|
|
|
|
+ <div class="mb-4" v-if="flows.length">
|
|
|
|
+ <el-steps align-center>
|
|
|
|
+ <el-step
|
|
|
|
+ v-for="flow in flows"
|
|
|
|
+ :key="flow.taskKey"
|
|
|
|
+ :title="flow.taskName"
|
|
|
|
+ :status="flow.status"
|
|
>
|
|
>
|
|
- </div>
|
|
|
|
- <table class="table">
|
|
|
|
- <tr>
|
|
|
|
- <th>试卷类型</th>
|
|
|
|
- <th>试卷文件</th>
|
|
|
|
- <th>答题卡创建方式</th>
|
|
|
|
- <th>答题卡</th>
|
|
|
|
- <th v-if="IS_APPLY">操作</th>
|
|
|
|
- </tr>
|
|
|
|
- <tr v-for="(attachment, index) in paperAttachments" :key="index">
|
|
|
|
- <td>{{ attachment.name }}卷</td>
|
|
|
|
- <td class="td-link">
|
|
|
|
- <span
|
|
|
|
- v-if="IS_APPLY"
|
|
|
|
- @click="toUpload(attachment)"
|
|
|
|
- title="点击上传试卷"
|
|
|
|
- >
|
|
|
|
- <i
|
|
|
|
- :class="[
|
|
|
|
- 'icon',
|
|
|
|
- attachment.attachmentId ? 'icon-files-act' : 'icon-files'
|
|
|
|
- ]"
|
|
|
|
- ></i
|
|
|
|
- >{{
|
|
|
|
- attachment.attachmentId
|
|
|
|
- ? attachment.filename
|
|
|
|
- : "点击上传试卷文件"
|
|
|
|
- }}
|
|
|
|
- </span>
|
|
|
|
- <span
|
|
|
|
- v-else
|
|
|
|
- @click="downloadPaper(attachment)"
|
|
|
|
- title="点击查看试卷"
|
|
|
|
- >
|
|
|
|
- <i
|
|
|
|
- class="icon icon-download-act"
|
|
|
|
- v-if="attachment.attachmentId"
|
|
|
|
- ></i>
|
|
|
|
- <i>{{ attachment.filename }}</i>
|
|
|
|
- </span>
|
|
|
|
- </td>
|
|
|
|
- <td :rowspan="paperAttachments.length" v-if="index === 0">
|
|
|
|
- {{ createCardTypeName }}
|
|
|
|
- </td>
|
|
|
|
- <td
|
|
|
|
- class="td-link"
|
|
|
|
- :rowspan="paperAttachments.length"
|
|
|
|
- v-if="index === 0"
|
|
|
|
|
|
+ <div slot="description">
|
|
|
|
+ <p class="step-desc">{{ flow.desc }}</p>
|
|
|
|
+ <div class="step-info" v-if="flow.firstUser">
|
|
|
|
+ <span>{{ flow.firstUser }}</span>
|
|
|
|
+ <el-popover
|
|
|
|
+ v-if="flow.moreUser"
|
|
|
|
+ placement="top-start"
|
|
|
|
+ width="300"
|
|
|
|
+ trigger="hover"
|
|
|
|
+ :content="flow.moreUser"
|
|
|
|
+ >
|
|
|
|
+ <span class="color-primary" slot="reference">更多</span>
|
|
|
|
+ </el-popover>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-step>
|
|
|
|
+ </el-steps>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="part-box part-box-pad part-box-border">
|
|
|
|
+ <p class="tips-info tips-dark mb-2">
|
|
|
|
+ 提示:多卷型试卷由于会绑定一个答题卡模板,因此试卷结构必须相同。多卷型试卷之间客观题要求试题内容相同,可允许大题内的小题题序不同。
|
|
|
|
+ </p>
|
|
|
|
+ <div class="task-body">
|
|
|
|
+ <div v-if="IS_APPLY" class="mb-2 text-right">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="el-icon-circle-plus-outline"
|
|
|
|
+ @click="addAtachment"
|
|
|
|
+ >增加卷型</el-button
|
|
>
|
|
>
|
|
- <span v-if="IS_APPLY" @click="toCreateOrViewCard"
|
|
|
|
- ><i class="icon icon-plus-act"></i>{{ cardTodoName }}</span
|
|
|
|
- >
|
|
|
|
- <span v-else @click="toViewCard">
|
|
|
|
- <i class="icon icon-circle-right"></i>
|
|
|
|
- <i>查看题卡</i>
|
|
|
|
- </span>
|
|
|
|
- <el-button
|
|
|
|
- v-if="curTaskApply.makeMethod && IS_APPLY"
|
|
|
|
- size="mini"
|
|
|
|
- type="primary"
|
|
|
|
- @click="changeCreateCardType"
|
|
|
|
- >切换题卡创建方式</el-button
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <table class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <th>试卷类型</th>
|
|
|
|
+ <th>试卷文件</th>
|
|
|
|
+ <th>答题卡创建方式</th>
|
|
|
|
+ <th>答题卡</th>
|
|
|
|
+ <th v-if="IS_APPLY">操作</th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr v-for="(attachment, index) in paperAttachments" :key="index">
|
|
|
|
+ <td>{{ attachment.name }}卷</td>
|
|
|
|
+ <td class="td-link">
|
|
|
|
+ <span
|
|
|
|
+ v-if="IS_APPLY"
|
|
|
|
+ @click="toUpload(attachment)"
|
|
|
|
+ title="点击上传试卷"
|
|
|
|
+ >
|
|
|
|
+ <i
|
|
|
|
+ :class="[
|
|
|
|
+ 'icon',
|
|
|
|
+ attachment.attachmentId ? 'icon-files-act' : 'icon-files'
|
|
|
|
+ ]"
|
|
|
|
+ ></i
|
|
|
|
+ >{{
|
|
|
|
+ attachment.attachmentId
|
|
|
|
+ ? attachment.filename
|
|
|
|
+ : "点击上传试卷文件"
|
|
|
|
+ }}
|
|
|
|
+ </span>
|
|
|
|
+ <span
|
|
|
|
+ v-else
|
|
|
|
+ @click="downloadPaper(attachment)"
|
|
|
|
+ title="点击查看试卷"
|
|
|
|
+ >
|
|
|
|
+ <i
|
|
|
|
+ class="icon icon-download-act"
|
|
|
|
+ v-if="attachment.attachmentId"
|
|
|
|
+ ></i>
|
|
|
|
+ <i>{{ attachment.filename }}</i>
|
|
|
|
+ </span>
|
|
|
|
+ </td>
|
|
|
|
+ <td :rowspan="paperAttachments.length" v-if="index === 0">
|
|
|
|
+ {{ createCardTypeName }}
|
|
|
|
+ </td>
|
|
|
|
+ <td
|
|
|
|
+ class="td-link"
|
|
|
|
+ :rowspan="paperAttachments.length"
|
|
|
|
+ v-if="index === 0"
|
|
>
|
|
>
|
|
- </td>
|
|
|
|
- <td v-if="IS_APPLY">
|
|
|
|
- <el-button
|
|
|
|
- class="btn-table-icon"
|
|
|
|
- type="text"
|
|
|
|
- icon="icon icon-delete"
|
|
|
|
- title="删除"
|
|
|
|
- @click="deleteAttachment(index)"
|
|
|
|
- ></el-button>
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
|
|
+ <span v-if="IS_APPLY" @click="toCreateOrViewCard"
|
|
|
|
+ ><i class="icon icon-plus-act"></i>{{ cardTodoName }}</span
|
|
|
|
+ >
|
|
|
|
+ <span v-else @click="toViewCard">
|
|
|
|
+ <i class="icon icon-circle-right"></i>
|
|
|
|
+ <i>查看题卡</i>
|
|
|
|
+ </span>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="curTaskApply.makeMethod && IS_APPLY"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="changeCreateCardType"
|
|
|
|
+ >切换题卡创建方式</el-button
|
|
|
|
+ >
|
|
|
|
+ </td>
|
|
|
|
+ <td v-if="IS_APPLY">
|
|
|
|
+ <el-button
|
|
|
|
+ class="btn-table-icon"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="icon icon-delete"
|
|
|
|
+ title="删除"
|
|
|
|
+ @click="deleteAttachment(index)"
|
|
|
|
+ ></el-button>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
|
|
- <el-form>
|
|
|
|
- <el-form-item label="单次抽卷卷型数量:" label-width="150">
|
|
|
|
- <el-input-number
|
|
|
|
- v-model="curTaskApply.drawCount"
|
|
|
|
- :min="1"
|
|
|
|
- :max="maxFetchCount"
|
|
|
|
- :step="1"
|
|
|
|
- step-strictly
|
|
|
|
- :controls="false"
|
|
|
|
- :disabled="!IS_APPLY"
|
|
|
|
- ></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
|
|
+ <el-form>
|
|
|
|
+ <el-form-item label="单次抽卷卷型数量:" label-width="150">
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-model="curTaskApply.drawCount"
|
|
|
|
+ :min="1"
|
|
|
|
+ :max="maxFetchCount"
|
|
|
|
+ :step="1"
|
|
|
|
+ step-strictly
|
|
|
|
+ :controls="false"
|
|
|
|
+ :disabled="!IS_APPLY"
|
|
|
|
+ ></el-input-number>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
|
|
- <h4 class="mb-2">备注说明:</h4>
|
|
|
|
- <el-input
|
|
|
|
- class="mb-2"
|
|
|
|
- v-model="curTaskApply.remark"
|
|
|
|
- type="textarea"
|
|
|
|
- resize="none"
|
|
|
|
- :rows="2"
|
|
|
|
- :maxlength="100"
|
|
|
|
- clearable
|
|
|
|
- show-word-limit
|
|
|
|
- placeholder="建议不超过100个字"
|
|
|
|
- :disabled="!IS_APPLY"
|
|
|
|
- ></el-input>
|
|
|
|
|
|
+ <h4 class="mb-2">备注说明:</h4>
|
|
|
|
+ <el-input
|
|
|
|
+ class="mb-2"
|
|
|
|
+ v-model="curTaskApply.remark"
|
|
|
|
+ type="textarea"
|
|
|
|
+ resize="none"
|
|
|
|
+ :rows="2"
|
|
|
|
+ :maxlength="100"
|
|
|
|
+ clearable
|
|
|
|
+ show-word-limit
|
|
|
|
+ placeholder="建议不超过100个字"
|
|
|
|
+ :disabled="!IS_APPLY"
|
|
|
|
+ ></el-input>
|
|
|
|
|
|
- <h4 class="mb-2">上传入库审核表(最多4张)</h4>
|
|
|
|
- <div class="image-list">
|
|
|
|
- <div
|
|
|
|
- class="image-item"
|
|
|
|
- v-for="(img, index) in paperConfirmAttachments"
|
|
|
|
- :key="index"
|
|
|
|
- >
|
|
|
|
- <img
|
|
|
|
- :src="img.url"
|
|
|
|
- :alt="img.filename"
|
|
|
|
- title="点击查看大图"
|
|
|
|
- @click="toPreview(index)"
|
|
|
|
- />
|
|
|
|
- <div v-if="IS_APPLY" class="image-delete">
|
|
|
|
- <i
|
|
|
|
- class="el-icon-delete-solid"
|
|
|
|
- @click="deletePaperConfirmAttachment(index)"
|
|
|
|
- ></i>
|
|
|
|
|
|
+ <h4 class="mb-2">上传入库审核表(最多4张)</h4>
|
|
|
|
+ <div class="image-list">
|
|
|
|
+ <div
|
|
|
|
+ class="image-item"
|
|
|
|
+ v-for="(img, index) in paperConfirmAttachments"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ :src="img.url"
|
|
|
|
+ :alt="img.filename"
|
|
|
|
+ title="点击查看大图"
|
|
|
|
+ @click="toPreview(index)"
|
|
|
|
+ />
|
|
|
|
+ <div v-if="IS_APPLY" class="image-delete">
|
|
|
|
+ <i
|
|
|
|
+ class="el-icon-delete-solid"
|
|
|
|
+ @click="deletePaperConfirmAttachment(index)"
|
|
|
|
+ ></i>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="paperConfirmAttachments.length < 4 && IS_APPLY"
|
|
|
|
+ class="image-item image-add"
|
|
|
|
+ title="上传入库审核表"
|
|
|
|
+ @click="toUploadPaperConfirm"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- v-if="paperConfirmAttachments.length < 4 && IS_APPLY"
|
|
|
|
- class="image-item image-add"
|
|
|
|
- title="上传入库审核表"
|
|
|
|
- @click="toUploadPaperConfirm"
|
|
|
|
|
|
+
|
|
|
|
+ <!-- audit -->
|
|
|
|
+ <el-form
|
|
|
|
+ v-if="IS_AUDIT"
|
|
|
|
+ ref="auditModalComp"
|
|
|
|
+ :model="auditModal"
|
|
|
|
+ :rules="auditRules"
|
|
|
|
+ label-width="90px"
|
|
>
|
|
>
|
|
- <i class="el-icon-plus"></i>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <el-form-item prop="approvePass" label="审批操作:">
|
|
|
|
+ <el-radio-group v-model="auditModal.approvePass">
|
|
|
|
+ <el-radio
|
|
|
|
+ v-for="(val, key) in TASK_AUDIT_RESULT"
|
|
|
|
+ :key="key"
|
|
|
|
+ :label="key"
|
|
|
|
+ >{{ val }}</el-radio
|
|
|
|
+ >
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ v-if="auditModal.approvePass === 'REJECT'"
|
|
|
|
+ prop="setup"
|
|
|
|
+ label="驳回节点:"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="auditModal.setup" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in setups"
|
|
|
|
+ :key="item.taskKey"
|
|
|
|
+ :value="item.setup"
|
|
|
|
+ :label="item.taskName"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ v-if="auditModal.approvePass === 'REJECT'"
|
|
|
|
+ prop="remark"
|
|
|
|
+ label="审批意见:"
|
|
|
|
+ >
|
|
|
|
+ <el-input
|
|
|
|
+ class="mb-2"
|
|
|
|
+ v-model="auditModal.remark"
|
|
|
|
+ type="textarea"
|
|
|
|
+ resize="none"
|
|
|
|
+ :rows="5"
|
|
|
|
+ :maxlength="1000"
|
|
|
|
+ clearable
|
|
|
|
+ show-word-limit
|
|
|
|
+ placeholder="建议不超过1000个字"
|
|
|
|
+ ref="ReasonInput"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- audit -->
|
|
|
|
- <el-form
|
|
|
|
- v-if="IS_AUDIT"
|
|
|
|
- ref="auditModalComp"
|
|
|
|
- :model="auditModal"
|
|
|
|
- :rules="auditRules"
|
|
|
|
- label-width="90px"
|
|
|
|
- >
|
|
|
|
- <el-form-item prop="approvePass" label="审批操作:">
|
|
|
|
- <el-radio-group v-model="auditModal.approvePass">
|
|
|
|
- <el-radio
|
|
|
|
- v-for="(val, key) in TASK_AUDIT_RESULT"
|
|
|
|
- :key="key"
|
|
|
|
- :label="key"
|
|
|
|
- >{{ val }}</el-radio
|
|
|
|
- >
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- v-if="auditModal.approvePass === 'REJECT'"
|
|
|
|
- prop="setup"
|
|
|
|
- label="驳回节点:"
|
|
|
|
|
|
+ <div class="task-action">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="IS_APPLY"
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="isSubmit"
|
|
|
|
+ @click="submit"
|
|
|
|
+ >确认提交</el-button
|
|
>
|
|
>
|
|
- <el-select v-model="auditModal.setup" placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in setups"
|
|
|
|
- :key="item.taskKey"
|
|
|
|
- :value="item.setup"
|
|
|
|
- :label="item.taskName"
|
|
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- v-if="auditModal.approvePass === 'REJECT'"
|
|
|
|
- prop="remark"
|
|
|
|
- label="审批意见:"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="IS_APPLY"
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="isSubmit"
|
|
|
|
+ style="width:88px;"
|
|
|
|
+ @click="toSave"
|
|
|
|
+ >暂存</el-button
|
|
>
|
|
>
|
|
- <el-input
|
|
|
|
- class="mb-2"
|
|
|
|
- v-model="auditModal.remark"
|
|
|
|
- type="textarea"
|
|
|
|
- resize="none"
|
|
|
|
- :rows="5"
|
|
|
|
- :maxlength="1000"
|
|
|
|
- clearable
|
|
|
|
- show-word-limit
|
|
|
|
- placeholder="建议不超过1000个字"
|
|
|
|
- ref="ReasonInput"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- </div>
|
|
|
|
- <div class="task-action">
|
|
|
|
- <el-button
|
|
|
|
- v-if="IS_APPLY"
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="isSubmit"
|
|
|
|
- @click="submit"
|
|
|
|
- >确认提交</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-if="IS_APPLY"
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="isSubmit"
|
|
|
|
- style="width:88px;"
|
|
|
|
- @click="toSave"
|
|
|
|
- >暂存</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-if="IS_AUDIT"
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="isSubmit"
|
|
|
|
- @click="toAuditApply"
|
|
|
|
- >确定</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="danger" @click="cancel" plain>取消</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="IS_AUDIT"
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="isSubmit"
|
|
|
|
+ @click="toAuditApply"
|
|
|
|
+ >确定</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button type="danger" @click="cancel" plain>取消</el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- upload-paper-dialog -->
|
|
<!-- upload-paper-dialog -->
|
|
@@ -256,7 +285,9 @@ import {
|
|
taskApplyDetail,
|
|
taskApplyDetail,
|
|
updateTaskApply,
|
|
updateTaskApply,
|
|
updateTaskReview,
|
|
updateTaskReview,
|
|
- switchCardCreateMethod
|
|
|
|
|
|
+ switchCardCreateMethod,
|
|
|
|
+ taskAllFlowSetups,
|
|
|
|
+ taskAllApproverPeople
|
|
} from "../api";
|
|
} from "../api";
|
|
import { attachmentPreview } from "../../login/api";
|
|
import { attachmentPreview } from "../../login/api";
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
@@ -276,6 +307,7 @@ const initTaskApply = {
|
|
drawCount: 1,
|
|
drawCount: 1,
|
|
// 流程
|
|
// 流程
|
|
flowId: "",
|
|
flowId: "",
|
|
|
|
+ setup: 0,
|
|
// 工作台任务id
|
|
// 工作台任务id
|
|
flowTaskId: "",
|
|
flowTaskId: "",
|
|
// 题卡状态
|
|
// 题卡状态
|
|
@@ -300,12 +332,6 @@ export default {
|
|
type: String,
|
|
type: String,
|
|
default: "APPLY",
|
|
default: "APPLY",
|
|
validator: val => ["APPLY", "PREVIEW", "AUDIT"].includes(val)
|
|
validator: val => ["APPLY", "PREVIEW", "AUDIT"].includes(val)
|
|
- },
|
|
|
|
- flows: {
|
|
|
|
- type: Array,
|
|
|
|
- default() {
|
|
|
|
- return [];
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -323,6 +349,7 @@ export default {
|
|
reason: "",
|
|
reason: "",
|
|
// audit
|
|
// audit
|
|
TASK_AUDIT_RESULT,
|
|
TASK_AUDIT_RESULT,
|
|
|
|
+ flows: [],
|
|
setups: [],
|
|
setups: [],
|
|
auditModal: {
|
|
auditModal: {
|
|
approvePass: "PASS",
|
|
approvePass: "PASS",
|
|
@@ -406,16 +433,6 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async initData() {
|
|
async initData() {
|
|
- if (!this.examTask.id) {
|
|
|
|
- this.curTaskApply = this.$objAssign(initTaskApply, {
|
|
|
|
- courseCode: this.examTask.courseCode,
|
|
|
|
- courseName: this.examTask.courseName,
|
|
|
|
- cardRuleId: this.examTask.cardRuleId,
|
|
|
|
- customCard: this.examTask.customCard
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const data = await taskApplyDetail(
|
|
const data = await taskApplyDetail(
|
|
this.examTask.id,
|
|
this.examTask.id,
|
|
this.examTask.source
|
|
this.examTask.source
|
|
@@ -426,6 +443,7 @@ export default {
|
|
this.curTaskApply.courseName = this.examTask.courseName;
|
|
this.curTaskApply.courseName = this.examTask.courseName;
|
|
this.curTaskApply.cardRuleId = this.examTask.cardRuleId;
|
|
this.curTaskApply.cardRuleId = this.examTask.cardRuleId;
|
|
this.curTaskApply.customCard = this.examTask.customCard;
|
|
this.curTaskApply.customCard = this.examTask.customCard;
|
|
|
|
+ this.curTaskApply.setup = this.examTask.setup;
|
|
this.paperAttachments = this.curTaskApply.paperAttachmentIds
|
|
this.paperAttachments = this.curTaskApply.paperAttachmentIds
|
|
? JSON.parse(this.curTaskApply.paperAttachmentIds)
|
|
? JSON.parse(this.curTaskApply.paperAttachmentIds)
|
|
: [];
|
|
: [];
|
|
@@ -433,10 +451,56 @@ export default {
|
|
? JSON.parse(this.curTaskApply.paperConfirmAttachmentIds)
|
|
? JSON.parse(this.curTaskApply.paperConfirmAttachmentIds)
|
|
: [];
|
|
: [];
|
|
|
|
|
|
|
|
+ this.buildSteps();
|
|
|
|
+ },
|
|
|
|
+ async buildSteps() {
|
|
|
|
+ if (!this.curTaskApply.flowId) return;
|
|
|
|
+
|
|
|
|
+ const flowStatus = {
|
|
|
|
+ wait: "待进行",
|
|
|
|
+ process: "进行中",
|
|
|
|
+ success: "已完成"
|
|
|
|
+ };
|
|
|
|
+ const approveData = await taskAllApproverPeople({
|
|
|
|
+ taskId: this.curTaskApply.flowTaskId
|
|
|
|
+ });
|
|
|
|
+ let approvePeople = {};
|
|
|
|
+ approveData.approveUserList.forEach(item => {
|
|
|
|
+ item.users = item.approveUser.map(
|
|
|
|
+ user => `${user.realName}(${user.orgName})`
|
|
|
|
+ );
|
|
|
|
+ item.firstUser = item.users[0];
|
|
|
|
+ item.moreUser = item.users.length > 1 ? item.users.join(",") : null;
|
|
|
|
+ approvePeople[item.setup] = item;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const flowData = await taskAllFlowSetups(this.curTaskApply.flowId);
|
|
|
|
+ const curSetup = this.curTaskApply.setup;
|
|
|
|
+ this.flows = flowData.map(item => {
|
|
|
|
+ item.status =
|
|
|
|
+ curSetup > item.setup
|
|
|
|
+ ? "success"
|
|
|
|
+ : curSetup === item.setup
|
|
|
|
+ ? "process"
|
|
|
|
+ : "wait";
|
|
|
|
+ item.desc = flowStatus[item.status];
|
|
|
|
+ item.isCurrent = curSetup === item.setup;
|
|
|
|
+ item = { ...item, ...approvePeople[item.setup] };
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
|
|
+
|
|
if (this.flows.length) {
|
|
if (this.flows.length) {
|
|
const curFlow = this.flows.find(item => item.isCurrent);
|
|
const curFlow = this.flows.find(item => item.isCurrent);
|
|
if (curFlow)
|
|
if (curFlow)
|
|
- this.setups = this.flows.filter(item => item.setup < curFlow.setup);
|
|
|
|
|
|
+ this.setups = this.flows
|
|
|
|
+ .filter(item => item.setup < curFlow.setup)
|
|
|
|
+ .map(item => {
|
|
|
|
+ return {
|
|
|
|
+ taskKey: item.taskKey,
|
|
|
|
+ setup: item.setup,
|
|
|
|
+ taskName: item.taskName
|
|
|
|
+ };
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
addAtachment() {
|
|
addAtachment() {
|