|
|
@@ -73,9 +73,8 @@
|
|
|
>
|
|
|
<div class="dialog-content">
|
|
|
<div class="form-item">
|
|
|
- <label class="form-label">补充意见</label>
|
|
|
<el-input
|
|
|
- v-model="supplementForm.content"
|
|
|
+ v-model="additionalParams.content"
|
|
|
type="textarea"
|
|
|
:rows="6"
|
|
|
placeholder="请输入补充意见"
|
|
|
@@ -85,7 +84,7 @@
|
|
|
</div>
|
|
|
<div class="form-item">
|
|
|
<label class="form-label">发送方式</label>
|
|
|
- <el-checkbox-group v-model="supplementForm.sendType">
|
|
|
+ <el-checkbox-group v-model="additionalParams.sendType">
|
|
|
<el-checkbox label="site">站内消息</el-checkbox>
|
|
|
<el-checkbox label="sms">短信通知</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
@@ -106,9 +105,8 @@
|
|
|
>
|
|
|
<div class="dialog-content">
|
|
|
<div class="form-item">
|
|
|
- <label class="form-label">中止意见</label>
|
|
|
<el-input
|
|
|
- v-model="abortForm.content"
|
|
|
+ v-model="additionalParams.content"
|
|
|
type="textarea"
|
|
|
:rows="6"
|
|
|
placeholder="请输入中止意见"
|
|
|
@@ -118,7 +116,7 @@
|
|
|
</div>
|
|
|
<div class="form-item">
|
|
|
<label class="form-label">发送方式</label>
|
|
|
- <el-checkbox-group v-model="abortForm.sendType">
|
|
|
+ <el-checkbox-group v-model="additionalParams.sendType">
|
|
|
<el-checkbox label="site">站内消息</el-checkbox>
|
|
|
<el-checkbox label="sms">短信通知</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
@@ -139,9 +137,8 @@
|
|
|
>
|
|
|
<div class="dialog-content">
|
|
|
<div class="form-item">
|
|
|
- <label class="form-label">退回意见</label>
|
|
|
<el-input
|
|
|
- v-model="rejectForm.content"
|
|
|
+ v-model="additionalParams.content"
|
|
|
type="textarea"
|
|
|
:rows="6"
|
|
|
placeholder="请输入退回意见"
|
|
|
@@ -151,7 +148,7 @@
|
|
|
</div>
|
|
|
<div class="form-item">
|
|
|
<label class="form-label">发送方式</label>
|
|
|
- <el-checkbox-group v-model="rejectForm.sendType">
|
|
|
+ <el-checkbox-group v-model="additionalParams.sendType">
|
|
|
<el-checkbox label="site">站内消息</el-checkbox>
|
|
|
<el-checkbox label="sms">短信通知</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
@@ -215,18 +212,7 @@
|
|
|
showAbortDialog: false,
|
|
|
showRejectDialog: false,
|
|
|
// 弹窗数据
|
|
|
- supplementForm: {
|
|
|
- content: '',
|
|
|
- sendType: ['site', 'sms'], // 默认选中站内消息和短信通知
|
|
|
- },
|
|
|
- abortForm: {
|
|
|
- content: '',
|
|
|
- sendType: ['site', 'sms'],
|
|
|
- },
|
|
|
- rejectForm: {
|
|
|
- content: '',
|
|
|
- sendType: ['site', 'sms'],
|
|
|
- },
|
|
|
+ additionalParams: {},
|
|
|
// 当前操作按钮信息
|
|
|
currentButton: null,
|
|
|
}
|
|
|
@@ -365,53 +351,49 @@
|
|
|
},
|
|
|
// 处理审核操作按钮点击
|
|
|
handleAuditPass(item) {
|
|
|
- this.currentButton = item
|
|
|
- // 根据key值显示对应的弹窗
|
|
|
- if (item.key === 1) {
|
|
|
- // 补充资料
|
|
|
- this.supplementForm.content = ''
|
|
|
- this.supplementForm.sendType = ['site', 'sms']
|
|
|
+ this.additionalParams = {
|
|
|
+ content: '',
|
|
|
+ sendType: [], // 默认选中站内消息和短信通知
|
|
|
+ }
|
|
|
+ this.currentButton = item // 保存当前按钮信息
|
|
|
+ console.log('点击的按钮数据:', item)
|
|
|
+ const key = Number(item.key)
|
|
|
+ if (key === 1) {
|
|
|
this.showSupplementDialog = true
|
|
|
- } else if (item.key === 2) {
|
|
|
+ } else if (key === 2) {
|
|
|
// 中止监审
|
|
|
- this.abortForm.content = ''
|
|
|
- this.abortForm.sendType = ['site', 'sms']
|
|
|
this.showAbortDialog = true
|
|
|
- } else if (item.key === 4) {
|
|
|
+ } else if (key === 4) {
|
|
|
// 初审退回
|
|
|
- this.rejectForm.content = ''
|
|
|
- this.rejectForm.sendType = ['site', 'sms']
|
|
|
this.showRejectDialog = true
|
|
|
} else {
|
|
|
- // 其他操作直接执行
|
|
|
- this.executeAuditOperation(item)
|
|
|
+ this.executeAuditOperation()
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 执行审核操作
|
|
|
- async executeAuditOperation(item, additionalParams = {}) {
|
|
|
+ async executeAuditOperation() {
|
|
|
if (!this.id) {
|
|
|
this.$message.error('缺少任务ID')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ if (!this.currentButton) {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
try {
|
|
|
const params = {
|
|
|
taskId: this.id,
|
|
|
- ...(this.currentNode &&
|
|
|
- this.currentNode.trim() !== '' && {
|
|
|
- processNodeKey:
|
|
|
- this.currentNode === 'ccls' ? 'clcs' : this.currentNode,
|
|
|
- }),
|
|
|
- // 根据按钮项传递其他必要参数
|
|
|
- ...item,
|
|
|
- ...additionalParams,
|
|
|
+ processNodeKey: this.currentNode,
|
|
|
+ key: this.currentButton.key,
|
|
|
+ sendType: this.additionalParams.sendType?.join(','),
|
|
|
+ content: this.additionalParams.content,
|
|
|
}
|
|
|
|
|
|
const response = await doProcessBtn(params)
|
|
|
|
|
|
if (response && response.code === 200) {
|
|
|
- this.$message.success(item.value + '操作成功')
|
|
|
+ this.$message.success(this.currentButton.value + '操作成功')
|
|
|
// 关闭所有弹窗
|
|
|
this.showSupplementDialog = false
|
|
|
this.showAbortDialog = false
|
|
|
@@ -421,47 +403,61 @@
|
|
|
// 触发父组件刷新列表
|
|
|
this.$emit('refresh')
|
|
|
} else {
|
|
|
- this.$message.error(response?.message || item.value + '操作失败')
|
|
|
+ this.$message.error(
|
|
|
+ response?.message || this.currentButton.value + '操作失败'
|
|
|
+ )
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- this.$message.error(item.value + '操作失败')
|
|
|
+ this.$message.error(this.currentButton.value + '操作失败')
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 提交补充资料
|
|
|
submitSupplement() {
|
|
|
- if (!this.supplementForm.content.trim()) {
|
|
|
+ if (
|
|
|
+ !this.additionalParams.content ||
|
|
|
+ !this.additionalParams.content.trim()
|
|
|
+ ) {
|
|
|
this.$message.error('请输入补充意见')
|
|
|
return
|
|
|
}
|
|
|
- this.executeAuditOperation(this.currentButton, {
|
|
|
- content: this.supplementForm.content,
|
|
|
- sendType: this.supplementForm.sendType.join(','),
|
|
|
- })
|
|
|
+ if (this.currentButton) {
|
|
|
+ this.executeAuditOperation(this.currentButton)
|
|
|
+ } else {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 提交中止监审
|
|
|
submitAbort() {
|
|
|
- if (!this.abortForm.content.trim()) {
|
|
|
+ if (
|
|
|
+ !this.additionalParams.content ||
|
|
|
+ !this.additionalParams.content.trim()
|
|
|
+ ) {
|
|
|
this.$message.error('请输入中止意见')
|
|
|
return
|
|
|
}
|
|
|
- this.executeAuditOperation(this.currentButton, {
|
|
|
- content: this.abortForm.content,
|
|
|
- sendType: this.abortForm.sendType.join(','),
|
|
|
- })
|
|
|
+ if (this.currentButton) {
|
|
|
+ this.executeAuditOperation(this.currentButton)
|
|
|
+ } else {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 提交初审退回
|
|
|
submitReject() {
|
|
|
- if (!this.rejectForm.content.trim()) {
|
|
|
+ if (
|
|
|
+ !this.additionalParams.content ||
|
|
|
+ !this.additionalParams.content.trim()
|
|
|
+ ) {
|
|
|
this.$message.error('请输入退回意见')
|
|
|
return
|
|
|
}
|
|
|
- this.executeAuditOperation(this.currentButton, {
|
|
|
- content: this.rejectForm.content,
|
|
|
- sendType: this.rejectForm.sendType.join(','),
|
|
|
- })
|
|
|
+ if (this.currentButton) {
|
|
|
+ this.executeAuditOperation(this.currentButton)
|
|
|
+ } else {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
@@ -519,16 +515,19 @@
|
|
|
display: inline-block;
|
|
|
width: 100px;
|
|
|
text-align: right;
|
|
|
- margin-right: 15px;
|
|
|
+ margin-right: 0;
|
|
|
color: #606266;
|
|
|
+ vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.form-item .el-checkbox-group {
|
|
|
- margin-left: 115px;
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
|
|
|
.form-item .el-checkbox {
|
|
|
margin-right: 20px;
|
|
|
+ vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.form-item .el-input__inner {
|