fix: [对标报告] 审批中和完成不显示修改按钮
This commit is contained in:
parent
b5f9ca5594
commit
e44a641af7
@ -84,9 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<el-button type="primary" @click="handleCreate">
|
<el-button type="primary" @click="handleCreate">新增</el-button>
|
||||||
新增
|
|
||||||
</el-button>
|
|
||||||
<!-- <el-button @click="handleDownloadTemplate">下载模板</el-button> -->
|
<!-- <el-button @click="handleDownloadTemplate">下载模板</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="page-data-list">
|
<div class="page-data-list">
|
||||||
@ -113,9 +111,7 @@
|
|||||||
v-for="(colConfig, index) in tableConfig.colConfigs"
|
v-for="(colConfig, index) in tableConfig.colConfigs"
|
||||||
v-slot:[colConfig.customHeadSlot]="{ column }"
|
v-slot:[colConfig.customHeadSlot]="{ column }"
|
||||||
>
|
>
|
||||||
<div v-if="colConfig.customHeadSlot" :key="index">
|
<div v-if="colConfig.customHeadSlot" :key="index"> {{ column }} {{ colConfig }} </div>
|
||||||
{{ column }} {{ colConfig }}
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template
|
<template
|
||||||
@ -126,60 +122,52 @@
|
|||||||
<span
|
<span
|
||||||
v-if="row[colConfig.prop] === 'APPROVING'"
|
v-if="row[colConfig.prop] === 'APPROVING'"
|
||||||
style="background: #E6A23C; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #E6A23C; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
|
>审核中</span
|
||||||
>
|
>
|
||||||
审核中
|
|
||||||
</span>
|
|
||||||
<span
|
<span
|
||||||
v-else-if="row[colConfig.prop] === 'COMPLETE'"
|
v-else-if="row[colConfig.prop] === 'COMPLETE'"
|
||||||
style="background: #67C23A; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #67C23A; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
|
>已完成</span
|
||||||
>
|
>
|
||||||
已完成
|
|
||||||
</span>
|
|
||||||
<span
|
<span
|
||||||
v-else-if="row[colConfig.prop] === 'DRAFT'"
|
v-else-if="row[colConfig.prop] === 'DRAFT'"
|
||||||
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
|
>草稿</span
|
||||||
>
|
>
|
||||||
草稿
|
|
||||||
</span>
|
|
||||||
<span
|
<span
|
||||||
v-else-if="row[colConfig.prop] === 'REJECTED'"
|
v-else-if="row[colConfig.prop] === 'REJECTED'"
|
||||||
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
|
>已拒绝</span
|
||||||
>
|
>
|
||||||
已拒绝
|
|
||||||
</span>
|
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
|
>-</span
|
||||||
>
|
>
|
||||||
-
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
||||||
<a
|
<a
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowView(row)"
|
@click.stop="handleRowView(row)"
|
||||||
|
>查看</a
|
||||||
>
|
>
|
||||||
查看
|
|
||||||
</a>
|
|
||||||
<span style="width: 6px; display: inline-block"></span>
|
<span style="width: 6px; display: inline-block"></span>
|
||||||
<a
|
<a
|
||||||
v-if="false"
|
v-if="row.status !== 'APPROVING' && row.status !== 'COMPLETE'"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
|
>修改</a
|
||||||
>
|
>
|
||||||
修改
|
|
||||||
</a>
|
|
||||||
<span style="width: 6px; display: inline-block"></span>
|
<span style="width: 6px; display: inline-block"></span>
|
||||||
<a
|
<a
|
||||||
v-if="row.status === 'APPROVING'"
|
v-if="row.status === 'APPROVING'"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleApprove(row)"
|
@click.stop="handleApprove(row)"
|
||||||
|
>审批</a
|
||||||
>
|
>
|
||||||
审批
|
|
||||||
</a>
|
|
||||||
<span
|
<span
|
||||||
v-if="row.status === 'APPROVING'"
|
v-if="row.status === 'APPROVING'"
|
||||||
style="width: 6px; display: inline-block"
|
style="width: 6px; display: inline-block"
|
||||||
@ -189,9 +177,8 @@
|
|||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleLaunch(row)"
|
@click.stop="handleLaunch(row)"
|
||||||
|
>发起</a
|
||||||
>
|
>
|
||||||
发起
|
|
||||||
</a>
|
|
||||||
<span
|
<span
|
||||||
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
|
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
|
||||||
style="width: 6px; display: inline-block"
|
style="width: 6px; display: inline-block"
|
||||||
@ -201,9 +188,8 @@
|
|||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRestart(row)"
|
@click.stop="handleRestart(row)"
|
||||||
|
>重新发起</a
|
||||||
>
|
>
|
||||||
重新发起
|
|
||||||
</a>
|
|
||||||
<span
|
<span
|
||||||
v-if="row.status === 'REJECTED'"
|
v-if="row.status === 'REJECTED'"
|
||||||
style="width: 6px; display: inline-block"
|
style="width: 6px; display: inline-block"
|
||||||
@ -213,9 +199,8 @@
|
|||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleDownload(row)"
|
@click.stop="handleDownload(row)"
|
||||||
|
>下载</a
|
||||||
>
|
>
|
||||||
下载
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -359,12 +344,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleDialogClose">
|
<el-button @click="handleDialogClose">取消</el-button>
|
||||||
取消
|
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" @click="handleSubmit">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -378,18 +359,6 @@
|
|||||||
@close="handleLaunchDialogClose"
|
@close="handleLaunchDialogClose"
|
||||||
>
|
>
|
||||||
<div class="dialog-body-wrapper">
|
<div class="dialog-body-wrapper">
|
||||||
<div class="approval-process-title">
|
|
||||||
<div class="description-label">
|
|
||||||
流程主题 <span class="required-mark">*</span>
|
|
||||||
</div>
|
|
||||||
<el-input
|
|
||||||
v-model="launchProcessTitle"
|
|
||||||
maxlength="100"
|
|
||||||
show-word-limit
|
|
||||||
placeholder="请输入流程主题"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="approval-workflow">
|
<div class="approval-workflow">
|
||||||
<div class="workflow-title">
|
<div class="workflow-title">
|
||||||
审批环节
|
审批环节
|
||||||
@ -445,12 +414,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleLaunchDialogClose">
|
<el-button @click="handleLaunchDialogClose">取消</el-button>
|
||||||
取消
|
<el-button type="primary" :loading="launching" @click="handleLaunchSubmit">确定</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" :loading="launching" @click="handleLaunchSubmit">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -538,7 +503,6 @@ export default {
|
|||||||
currentEditRow: null, // 当前要修改的行数据
|
currentEditRow: null, // 当前要修改的行数据
|
||||||
launchDialogVisible: false, // 发起弹窗显示状态
|
launchDialogVisible: false, // 发起弹窗显示状态
|
||||||
currentLaunchRow: null, // 当前要发起的行数据
|
currentLaunchRow: null, // 当前要发起的行数据
|
||||||
launchProcessTitle: '',
|
|
||||||
launchWorkflowSteps: [
|
launchWorkflowSteps: [
|
||||||
{
|
{
|
||||||
name: '校对',
|
name: '校对',
|
||||||
@ -753,7 +717,6 @@ export default {
|
|||||||
},
|
},
|
||||||
handleLaunch(row) {
|
handleLaunch(row) {
|
||||||
this.currentLaunchRow = row
|
this.currentLaunchRow = row
|
||||||
this.launchProcessTitle = row.title || ''
|
|
||||||
// 重置审批环节
|
// 重置审批环节
|
||||||
this.launchWorkflowSteps = [
|
this.launchWorkflowSteps = [
|
||||||
{
|
{
|
||||||
@ -783,7 +746,6 @@ export default {
|
|||||||
handleLaunchDialogClose() {
|
handleLaunchDialogClose() {
|
||||||
this.launchDialogVisible = false
|
this.launchDialogVisible = false
|
||||||
this.currentLaunchRow = null
|
this.currentLaunchRow = null
|
||||||
this.launchProcessTitle = ''
|
|
||||||
// 重置审批环节
|
// 重置审批环节
|
||||||
this.launchWorkflowSteps = [
|
this.launchWorkflowSteps = [
|
||||||
{
|
{
|
||||||
@ -825,13 +787,6 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 流程主题必填
|
|
||||||
const processTitle = (this.launchProcessTitle || '').trim()
|
|
||||||
if (!processTitle) {
|
|
||||||
this.$message.warning('请填写流程主题')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const reportId = this.currentLaunchRow.reportId || this.currentLaunchRow.id
|
const reportId = this.currentLaunchRow.reportId || this.currentLaunchRow.id
|
||||||
if (!reportId) {
|
if (!reportId) {
|
||||||
this.$message.error('缺少报告ID')
|
this.$message.error('缺少报告ID')
|
||||||
@ -842,7 +797,6 @@ export default {
|
|||||||
const submitData = {
|
const submitData = {
|
||||||
reportId: reportId,
|
reportId: reportId,
|
||||||
userId: getUserId(),
|
userId: getUserId(),
|
||||||
processTitle: processTitle,
|
|
||||||
proofreadUsers: this.launchWorkflowSteps[0].handlers,
|
proofreadUsers: this.launchWorkflowSteps[0].handlers,
|
||||||
reviewUsers: this.launchWorkflowSteps[1].handlers,
|
reviewUsers: this.launchWorkflowSteps[1].handlers,
|
||||||
countersignUsers: [],
|
countersignUsers: [],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user