fix:修改发起审批问题

This commit is contained in:
大黑 2025-12-24 09:03:53 +08:00
parent 280546c410
commit b5f9ca5594
9 changed files with 1231 additions and 846 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -275,6 +275,19 @@
</div> </div>
</div> </div>
<!-- 流程主题 -->
<div class="approval-process-title">
<div class="description-label">
流程主题 <span class="required-mark">*</span>
</div>
<el-input
v-model="approvalFormData.processTitle"
maxlength="100"
show-word-limit
placeholder="请输入流程主题"
/>
</div>
<!-- 说明 --> <!-- 说明 -->
<div class="approval-description"> <div class="approval-description">
<div class="description-label"> <div class="description-label">
@ -449,6 +462,7 @@ export default {
engineDetailInfo: null, // modelName projectNumber engineDetailInfo: null, // modelName projectNumber
wholeEngineParamsRawData: [], // "" wholeEngineParamsRawData: [], // ""
approvalFormData: { approvalFormData: {
processTitle: '',
description: '' description: ''
}, },
approvalSubmitting: false, // loading approvalSubmitting: false, // loading
@ -2604,6 +2618,7 @@ export default {
this.isApprovalMode = true this.isApprovalMode = true
// //
this.approvalFormData = { this.approvalFormData = {
processTitle: '',
description: '' description: ''
} }
// //
@ -2683,6 +2698,7 @@ export default {
this.isApprovalMode = false this.isApprovalMode = false
// //
this.approvalFormData = { this.approvalFormData = {
processTitle: '',
description: '' description: ''
} }
// //
@ -2733,6 +2749,13 @@ export default {
return return
} }
//
const processTitle = (this.approvalFormData.processTitle || '').trim()
if (!processTitle) {
this.$message.warning('请填写流程主题')
return
}
// paramList // paramList
const paramList = [] const paramList = []
const currentData = this.versionData[this.currentVersionId] || {} const currentData = this.versionData[this.currentVersionId] || {}
@ -2779,6 +2802,7 @@ export default {
modelId: this.detail.id, modelId: this.detail.id,
paramList: paramList, paramList: paramList,
comment: this.approvalFormData.description, comment: this.approvalFormData.description,
processTitle: processTitle,
nodeList: nodeList, nodeList: nodeList,
userId: getUserId() userId: getUserId()
} }

View File

@ -185,6 +185,8 @@
</x-vxe-table> </x-vxe-table>
</div> </div>
<!-- 流程主题 -->
<!-- 说明 --> <!-- 说明 -->
<div class="approval-description"> <div class="approval-description">
<div class="description-label"> <div class="description-label">
@ -196,6 +198,15 @@
:rows="2" :rows="2"
placeholder="请输入" placeholder="请输入"
/> />
<div class="description-label">
流程主题 <span class="required-mark">*</span>
</div>
<el-input
v-model="approvalFormData.processTitle"
maxlength="100"
show-word-limit
placeholder="请输入流程主题"
/>
</div> </div>
<!-- 审批环节 --> <!-- 审批环节 -->
@ -537,6 +548,7 @@ export default {
importFileList: [], importFileList: [],
selectedImportFile: null, selectedImportFile: null,
approvalFormData: { approvalFormData: {
processTitle: '',
description: '' description: ''
}, },
approvalSubmitting: false, // loading approvalSubmitting: false, // loading
@ -591,18 +603,21 @@ export default {
return this.versionList || [] return this.versionList || []
}, },
shouldShowButtonsNew() { shouldShowButtonsNew() {
const status = this.currentStatus || (this.detail && this.detail.status) || '' // GET_MODEL_DETAIL status
const status = this.currentStatus || ''
return status === 'DRAFT' && this.isLatestVersion return status === 'DRAFT' && this.isLatestVersion
}, },
// //
shouldShowButtons() { shouldShowButtons() {
// DRAFT COMPLETED // GET_MODEL_DETAIL status
const status = this.currentStatus || (this.detail && this.detail.status) || '' // DRAFT COMPLETE
const status = this.currentStatus || ''
return (status === 'DRAFT' || status === 'COMPLETE') && this.isLatestVersion return (status === 'DRAFT' || status === 'COMPLETE') && this.isLatestVersion
}, },
// DRAFT COMPLETED // DRAFT COMPLETE
shouldShowMaintainButton() { shouldShowMaintainButton() {
const status = this.currentStatus || (this.detail && this.detail.status) || '' // GET_MODEL_DETAIL status
const status = this.currentStatus || ''
const baseCondition = (status === 'DRAFT' || status === 'COMPLETE') && this.isLatestVersion const baseCondition = (status === 'DRAFT' || status === 'COMPLETE') && this.isLatestVersion
if (!baseCondition) { if (!baseCondition) {
return false return false
@ -1601,6 +1616,7 @@ export default {
this.isApprovalMode = true this.isApprovalMode = true
// //
this.approvalFormData = { this.approvalFormData = {
processTitle: '',
description: '' description: ''
} }
// //
@ -1660,6 +1676,7 @@ export default {
this.originalPaginationForApproval = null this.originalPaginationForApproval = null
// //
this.approvalFormData = { this.approvalFormData = {
processTitle: '',
description: '' description: ''
} }
// //
@ -1701,6 +1718,11 @@ export default {
this.$message.error('缺少模板ID无法发起审批') this.$message.error('缺少模板ID无法发起审批')
return return
} }
const processTitle = (this.approvalFormData.processTitle || '').trim()
if (!processTitle) {
this.$message.warning('请填写流程主题')
return
}
const submitData = { const submitData = {
templateRowId: templateRowId, templateRowId: templateRowId,
@ -1708,6 +1730,7 @@ export default {
reviewUsers: this.approvalWorkflowSteps[1].handlers, reviewUsers: this.approvalWorkflowSteps[1].handlers,
countersignUsers: this.approvalWorkflowSteps[2].handlers, countersignUsers: this.approvalWorkflowSteps[2].handlers,
approveUsers: this.approvalWorkflowSteps[3].handlers, approveUsers: this.approvalWorkflowSteps[3].handlers,
processTitle: processTitle,
createBy: getUserId(), createBy: getUserId(),
userId: getUserId() userId: getUserId()
} }
@ -2334,6 +2357,10 @@ export default {
department: item.department ? this.formatDepartmentDisplay(item.department) : (item.department || '') department: item.department ? this.formatDepartmentDisplay(item.department) : (item.department || '')
} }
}) })
// resp.data result
const statusFromData = resp && resp.data ? (resp.data.status || resp.data.state || '') : ''
const statusFromResult = result && result.length > 0 ? (result[0].status || result[0].state || '') : ''
this.currentStatus = statusFromData || statusFromResult || ''
// 使 Vue.set 使 totalNumber // 使 Vue.set 使 totalNumber
this.$set(this.pagination, 'total', totalNumber) this.$set(this.pagination, 'total', totalNumber)
}) })
@ -2446,10 +2473,12 @@ export default {
department: item.department ? this.formatDepartmentDisplay(item.department) : (item.department || '') department: item.department ? this.formatDepartmentDisplay(item.department) : (item.department || '')
} }
}) })
// resp.data result // GET_MODEL_DETAIL resp.data result
const statusFromData = resp && resp.data ? (resp.data.status || resp.data.state || '') : '' const statusFromData = resp && resp.data ? (resp.data.status || resp.data.state || '') : ''
const statusFromResult = result && result.length > 0 ? (result[0].status || result[0].state || '') : '' const statusFromResult = result && result.length > 0 ? (result[0].status || result[0].state || '') : ''
// currentStatus
this.currentStatus = statusFromData || statusFromResult || '' this.currentStatus = statusFromData || statusFromResult || ''
console.log('从 GET_MODEL_DETAIL 接口获取到的状态:', this.currentStatus)
// 使 Vue.set 使 totalNumber // 使 Vue.set 使 totalNumber
this.$set(this.pagination, 'total', totalNumber) this.$set(this.pagination, 'total', totalNumber)

View File

@ -190,24 +190,20 @@
<!-- 配置部门模式 --> <!-- 配置部门模式 -->
<template v-if="personConfigFormData.configType === 'department'"> <template v-if="personConfigFormData.configType === 'department'">
<el-form-item label="责任部门:" prop="department"> <el-form-item label="责任部门:" prop="department">
<el-cascader <el-input
ref="departmentCascader" v-model="selectedDepartmentName"
v-model="personConfigFormData.department" placeholder="请选择责任部门"
:options="departmentList" readonly
:props="{
multiple: true,
checkStrictly: true,
value: 'id',
label: 'name',
children: 'children',
emitPath: true
}"
filterable
placeholder="请选择责任部门(可多选)"
clearable
style="width: 100%" style="width: 100%"
@change="handlePersonDepartmentChange" @click.native="handleOpenDepartmentDialog"
/> >
<i
slot="suffix"
class="el-input__icon el-icon-search"
style="cursor: pointer;"
@click.stop="handleOpenDepartmentDialog"
></i>
</el-input>
</el-form-item> </el-form-item>
</template> </template>
<!-- 配置人员模式 --> <!-- 配置人员模式 -->
@ -263,6 +259,45 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 部门选择弹窗 managerData 一致 -->
<el-dialog
title="选择责任部门"
:visible.sync="departmentDialogVisible"
width="500px"
:close-on-click-modal="false"
append-to-body
@close="handleDepartmentDialogClose"
>
<el-input
v-model="departmentTreeFilterText"
size="small"
placeholder="请输入部门名称进行搜索"
clearable
class="department-tree-search"
>
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-tree
ref="departmentTree"
:data="departmentList"
:props="{ children: 'children', label: 'name' }"
node-key="id"
:filter-node-method="filterDepartmentNode"
highlight-current
:expand-on-click-node="false"
class="department-tree"
@node-click="handleDepartmentNodeClick"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="handleDepartmentDialogClose">
取消
</el-button>
<el-button type="primary" :disabled="!selectedDepartmentId" @click="handleDepartmentDialogConfirm">
确定
</el-button>
</div>
</el-dialog>
<!-- 新增/编辑角色对话框 --> <!-- 新增/编辑角色对话框 -->
<el-dialog <el-dialog
:title="addRoleMode === 'add' ? '新增角色' : '编辑角色'" :title="addRoleMode === 'add' ? '新增角色' : '编辑角色'"
@ -377,6 +412,12 @@ export default {
}, },
personOptions: [], // personOptions: [], //
personSearchLoading: false, // loading personSearchLoading: false, // loading
// managerData
departmentDialogVisible: false,
departmentTreeFilterText: '',
selectedDepartmentId: '',
selectedDepartmentName: '',
selectedDepartmentNode: null,
personConfigFormRules: { personConfigFormRules: {
department: [ department: [
{ {
@ -464,6 +505,48 @@ export default {
console.error('获取用户自身角色失败:', err) console.error('获取用户自身角色失败:', err)
}) })
}, },
// managerData
handleOpenDepartmentDialog() {
//
if (this.selectedDepartmentId && this.$refs.departmentTree) {
this.$nextTick(() => {
this.$refs.departmentTree.setCurrentKey(this.selectedDepartmentId)
})
}
this.departmentTreeFilterText = ''
this.departmentDialogVisible = true
},
handleDepartmentDialogClose() {
this.departmentDialogVisible = false
this.departmentTreeFilterText = ''
//
},
handleDepartmentNodeClick(data) {
this.selectedDepartmentId = data.id
this.selectedDepartmentName = this.getDepartmentPathName(data.id) || data.name
this.selectedDepartmentNode = data
},
handleDepartmentDialogConfirm() {
if (!this.selectedDepartmentId) {
this.$message.warning('请选择责任部门')
return
}
this.personConfigFormData.selectDeptIds = [this.selectedDepartmentId]
this.personConfigFormData.department = this.selectedDepartmentId
this.personConfigFormData.selectDeptId = this.selectedDepartmentId
this.personConfigFormData.selectDeptName = this.selectedDepartmentName
this.departmentDialogVisible = false
//
this.$nextTick(() => {
if (this.$refs.personConfigForm) {
this.$refs.personConfigForm.clearValidate('department')
}
})
},
filterDepartmentNode(value, data) {
if (!value) return true
return (data.name || '').toLowerCase().includes(value.toLowerCase())
},
// //
validatePermissions(rule, value, callback) { validatePermissions(rule, value, callback) {
// //
@ -938,37 +1021,30 @@ export default {
// ["deptName-deptId"] // ["deptName-deptId"]
if (deptArray && deptArray.length > 0) { if (deptArray && deptArray.length > 0) {
// managerData
const deptIds = [] const deptIds = []
const deptPaths = [] let deptNameFromData = ''
deptArray.forEach((deptStr) => { deptArray.forEach((deptStr) => {
if (typeof deptStr === 'string' && deptStr.includes('-')) { if (typeof deptStr === 'string' && deptStr.includes('-')) {
// deptName-deptId // deptName-deptId
const parts = deptStr.split('-') const parts = deptStr.split('-')
if (parts.length >= 2) { if (parts.length >= 2) {
// deptId deptName
const deptId = parts[parts.length - 1] const deptId = parts[parts.length - 1]
// deptName deptNameFromData = parts.slice(0, -1).join('-')
// const deptName = parts.slice(0, -1).join('-')
//
const deptPath = this.findDepartmentPath(deptId)
if (deptPath && deptPath.length > 0) {
deptPaths.push(deptPath)
deptIds.push(deptId) deptIds.push(deptId)
} else {
// 使 deptId
deptIds.push(deptId)
//
deptPaths.push([deptId])
}
} }
} }
}) })
if (deptIds.length > 0) { if (deptIds.length > 0) {
this.personConfigFormData.selectDeptIds = deptIds const deptId = deptIds[0]
this.personConfigFormData.department = deptPaths this.personConfigFormData.selectDeptIds = [deptId]
this.selectedDepartmentId = deptId
//
const pathName = this.getDepartmentPathName(deptId)
this.selectedDepartmentName = pathName || deptNameFromData
this.personConfigFormData.department = deptId
// //
if (!personArray || personArray.length === 0) { if (!personArray || personArray.length === 0) {
this.personConfigFormData.configType = 'department' this.personConfigFormData.configType = 'department'
@ -976,13 +1052,17 @@ export default {
} }
} else { } else {
this.personConfigFormData.selectDeptIds = [] this.personConfigFormData.selectDeptIds = []
this.personConfigFormData.department = [] this.personConfigFormData.department = ''
this.selectedDepartmentId = ''
this.selectedDepartmentName = ''
} }
} else { } else {
this.personOptions = [] this.personOptions = []
this.personConfigFormData.person = [] this.personConfigFormData.person = []
this.personConfigFormData.selectDeptIds = [] this.personConfigFormData.selectDeptIds = []
this.personConfigFormData.department = [] this.personConfigFormData.department = ''
this.selectedDepartmentId = ''
this.selectedDepartmentName = ''
} }
}) })
.asyncErrorCatch((err) => { .asyncErrorCatch((err) => {
@ -1068,48 +1148,7 @@ export default {
}, },
// //
handlePersonDepartmentChange(value) { handlePersonDepartmentChange(value) {
if (this.personConfigFormData.configType === 'department') { // 使使
// value
// [[id1, id2], [id3, id4]]
if (value && Array.isArray(value) && value.length > 0) {
// ID
this.personConfigFormData.selectDeptIds = value.map(path => {
// path ID
if (Array.isArray(path) && path.length > 0) {
return path[path.length - 1]
}
// path ID
return path
}).filter(id => id) //
} else {
this.personConfigFormData.selectDeptIds = []
}
console.log('配置部门模式 - 选中的部门值:', value)
console.log('配置部门模式 - 选中的部门ID数组:', this.personConfigFormData.selectDeptIds)
//
this.$nextTick(() => {
if (this.$refs.personConfigForm) {
this.$refs.personConfigForm.validateField('department')
}
})
} else {
// value
if (value && Array.isArray(value) && value.length > 0) {
// id
this.personConfigFormData.selectDeptId = value[value.length - 1]
//
this.personConfigFormData.selectDeptName = this.getDepartmentPathName(this.personConfigFormData.selectDeptId)
//
this.personConfigFormData.person = []
this.personOptions = []
} else {
//
this.personConfigFormData.selectDeptId = ''
this.personConfigFormData.selectDeptName = ''
this.personConfigFormData.person = []
this.personOptions = []
}
}
}, },
// el-select // el-select
queryPersonByDepartment(queryString) { queryPersonByDepartment(queryString) {
@ -1285,17 +1324,11 @@ export default {
if (this.personConfigFormData.configType === 'department') { if (this.personConfigFormData.configType === 'department') {
// ID // ID
isDept = 1 isDept = 1
// 使 selectDeptIds department // 使ID managerData
if (this.personConfigFormData.selectDeptIds && this.personConfigFormData.selectDeptIds.length > 0) { if (this.selectedDepartmentId) {
userOrDeptId = [this.selectedDepartmentId]
} else if (this.personConfigFormData.selectDeptIds && this.personConfigFormData.selectDeptIds.length > 0) {
userOrDeptId = this.personConfigFormData.selectDeptIds userOrDeptId = this.personConfigFormData.selectDeptIds
} else if (this.personConfigFormData.department && Array.isArray(this.personConfigFormData.department) && this.personConfigFormData.department.length > 0) {
// selectDeptIds department
userOrDeptId = this.personConfigFormData.department.map(path => {
if (Array.isArray(path) && path.length > 0) {
return path[path.length - 1]
}
return path
}).filter(id => id)
} else { } else {
userOrDeptId = [] userOrDeptId = []
} }
@ -1366,6 +1399,9 @@ export default {
roleId: '', roleId: '',
roleName: '' roleName: ''
} }
this.selectedDepartmentId = ''
this.selectedDepartmentName = ''
this.selectedDepartmentNode = null
this.personOptions = [] this.personOptions = []
// //
if (this.personSearchTimer) { if (this.personSearchTimer) {

View File

@ -84,7 +84,9 @@
</div> </div>
<div class="toolbar"> <div class="toolbar">
<el-button type="primary" @click="handleCreate">新增</el-button> <el-button type="primary" @click="handleCreate">
新增
</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">
@ -111,7 +113,9 @@
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"> {{ column }} {{ colConfig }} </div> <div v-if="colConfig.customHeadSlot" :key="index">
{{ column }} {{ colConfig }}
</div>
</template> </template>
<template <template
@ -122,52 +126,60 @@
<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="false"
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"
@ -177,8 +189,9 @@
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"
@ -188,8 +201,9 @@
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"
@ -199,8 +213,9 @@
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>
@ -344,8 +359,12 @@
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="handleDialogClose">取消</el-button> <el-button @click="handleDialogClose">
<el-button type="primary" @click="handleSubmit">确定</el-button> 取消
</el-button>
<el-button type="primary" @click="handleSubmit">
确定
</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -359,6 +378,18 @@
@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">
审批环节 审批环节
@ -414,8 +445,12 @@
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="handleLaunchDialogClose">取消</el-button> <el-button @click="handleLaunchDialogClose">
<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>
@ -503,6 +538,7 @@ export default {
currentEditRow: null, // currentEditRow: null, //
launchDialogVisible: false, // launchDialogVisible: false, //
currentLaunchRow: null, // currentLaunchRow: null, //
launchProcessTitle: '',
launchWorkflowSteps: [ launchWorkflowSteps: [
{ {
name: '校对', name: '校对',
@ -717,6 +753,7 @@ export default {
}, },
handleLaunch(row) { handleLaunch(row) {
this.currentLaunchRow = row this.currentLaunchRow = row
this.launchProcessTitle = row.title || ''
// //
this.launchWorkflowSteps = [ this.launchWorkflowSteps = [
{ {
@ -746,6 +783,7 @@ export default {
handleLaunchDialogClose() { handleLaunchDialogClose() {
this.launchDialogVisible = false this.launchDialogVisible = false
this.currentLaunchRow = null this.currentLaunchRow = null
this.launchProcessTitle = ''
// //
this.launchWorkflowSteps = [ this.launchWorkflowSteps = [
{ {
@ -787,6 +825,13 @@ 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')
@ -797,6 +842,7 @@ 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: [],

View File

@ -165,12 +165,12 @@ export default {
}, },
handleRowView(row) { handleRowView(row) {
// //
const processTitle = row.processTitle || '' const dataType = row.dataType || ''
const isFillParameterMode = processTitle === '数据维护' const isFillParameterMode = dataType === '数据维护'
const isResponsibleDispatchMode = processTitle === '任务分解' const isResponsibleDispatchMode = dataType === '任务分解'
const isInApprovalMode = processTitle === '数据审批' const isInApprovalMode = dataType === '数据审批'
const isModelCheck = processTitle === '模板审核' const isModelCheck = dataType === '模板审核'
const isReportCheck = processTitle === '对标报告审核' const isReportCheck = dataType === '对标报告审核'
// //
this.currentModel = row.modelName || row.productFullName || '' this.currentModel = row.modelName || row.productFullName || ''