动态表单详情页面隐藏提交重置按钮,不可填写

This commit is contained in:
gexinzhineng/gxzn27 2023-02-02 09:44:10 +08:00
parent bdf8bafec5
commit ff147137c8
2 changed files with 6 additions and 10 deletions

View File

@ -70,8 +70,8 @@
<!-- 情况一流程表单 --> <!-- 情况一流程表单 -->
<el-col v-if="processInstance?.processDefinition?.formType === 10" :span="16" :offset="6"> <el-col v-if="processInstance?.processDefinition?.formType === 10" :span="16" :offset="6">
<form-create <form-create
ref="fApi"
:rule="detailForm.rule" :rule="detailForm.rule"
:api="fApi"
:option="detailForm.option" :option="detailForm.option"
v-model="detailForm.value" v-model="detailForm.value"
/> />
@ -200,6 +200,7 @@ import * as TaskApi from '@/api/bpm/task'
import * as ActivityApi from '@/api/bpm/activity' import * as ActivityApi from '@/api/bpm/activity'
import { formatPast2 } from '@/utils/formatTime' import { formatPast2 } from '@/utils/formatTime'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
// import { OptionAttrs } from '@form-create/element-ui/types/config'
import { ApiAttrs } from '@form-create/element-ui/types/config' import { ApiAttrs } from '@form-create/element-ui/types/config'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
@ -220,9 +221,6 @@ const auditRule = reactive({
// //
const handleAudit = async (task, pass) => { const handleAudit = async (task, pass) => {
console.log(task, 'task')
console.log(pass, 'pass')
console.log(runningTasks.value, 'runningTasks.value')
// 1.1 // 1.1
const index = runningTasks.value.indexOf(task) const index = runningTasks.value.indexOf(task)
const auditFormRef = proxy.$refs['form' + index][0] const auditFormRef = proxy.$refs['form' + index][0]
@ -239,9 +237,6 @@ const handleAudit = async (task, pass) => {
id: task.id, id: task.id,
reason: auditForms.value[index].reason reason: auditForms.value[index].reason
} }
console.log(data, '是否通过')
console.log(pass, 'pass是否通过')
console.log(task, 'task')
if (pass) { if (pass) {
await TaskApi.approveTask(data) await TaskApi.approveTask(data)
message.success('审批通过成功') message.success('审批通过成功')
@ -409,8 +404,9 @@ const getDetail = () => {
data.formVariables data.formVariables
) )
nextTick().then(() => { nextTick().then(() => {
fApi.value?.btn.show(false) fApi.value?.fapi.btn.show(false)
fApi.value?.resetBtn.show(false) fApi.value?.fapi.resetBtn.show(false)
fApi.value?.fapi.disabled(true)
}) })
} }

View File

@ -14,7 +14,7 @@
</template> </template>
<!-- 当前审批任务 --> <!-- 当前审批任务 -->
<template #tasks_default="{ row }"> <template #tasks_default="{ row }">
<el-button v-for="task in row.tasks" :key="task.id" type="text"> <el-button v-for="task in row.tasks" :key="task.id" link>
<span>{{ task.name }}</span> <span>{{ task.name }}</span>
</el-button> </el-button>
</template> </template>