Commit ff147137c80d41c74e2238245dfd35a0fc41eb85

Authored by gexinzhineng/gxzn27
1 parent bdf8bafe

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

yudao-ui-admin-vue3/src/views/bpm/processInstance/detail.vue
@@ -70,8 +70,8 @@ @@ -70,8 +70,8 @@
70 <!-- 情况一:流程表单 --> 70 <!-- 情况一:流程表单 -->
71 <el-col v-if="processInstance?.processDefinition?.formType === 10" :span="16" :offset="6"> 71 <el-col v-if="processInstance?.processDefinition?.formType === 10" :span="16" :offset="6">
72 <form-create 72 <form-create
  73 + ref="fApi"
73 :rule="detailForm.rule" 74 :rule="detailForm.rule"
74 - :api="fApi"  
75 :option="detailForm.option" 75 :option="detailForm.option"
76 v-model="detailForm.value" 76 v-model="detailForm.value"
77 /> 77 />
@@ -200,6 +200,7 @@ import * as TaskApi from &#39;@/api/bpm/task&#39; @@ -200,6 +200,7 @@ import * as TaskApi from &#39;@/api/bpm/task&#39;
200 import * as ActivityApi from '@/api/bpm/activity' 200 import * as ActivityApi from '@/api/bpm/activity'
201 import { formatPast2 } from '@/utils/formatTime' 201 import { formatPast2 } from '@/utils/formatTime'
202 import { setConfAndFields2 } from '@/utils/formCreate' 202 import { setConfAndFields2 } from '@/utils/formCreate'
  203 +// import { OptionAttrs } from '@form-create/element-ui/types/config'
203 import { ApiAttrs } from '@form-create/element-ui/types/config' 204 import { ApiAttrs } from '@form-create/element-ui/types/config'
204 import { useUserStore } from '@/store/modules/user' 205 import { useUserStore } from '@/store/modules/user'
205 206
@@ -220,9 +221,6 @@ const auditRule = reactive({ @@ -220,9 +221,6 @@ const auditRule = reactive({
220 221
221 // 处理审批通过和不通过的操作 222 // 处理审批通过和不通过的操作
222 const handleAudit = async (task, pass) => { 223 const handleAudit = async (task, pass) => {
223 - console.log(task, 'task')  
224 - console.log(pass, 'pass')  
225 - console.log(runningTasks.value, 'runningTasks.value')  
226 // 1.1 获得对应表单 224 // 1.1 获得对应表单
227 const index = runningTasks.value.indexOf(task) 225 const index = runningTasks.value.indexOf(task)
228 const auditFormRef = proxy.$refs['form' + index][0] 226 const auditFormRef = proxy.$refs['form' + index][0]
@@ -239,9 +237,6 @@ const handleAudit = async (task, pass) =&gt; { @@ -239,9 +237,6 @@ const handleAudit = async (task, pass) =&gt; {
239 id: task.id, 237 id: task.id,
240 reason: auditForms.value[index].reason 238 reason: auditForms.value[index].reason
241 } 239 }
242 - console.log(data, '是否通过')  
243 - console.log(pass, 'pass是否通过')  
244 - console.log(task, 'task')  
245 if (pass) { 240 if (pass) {
246 await TaskApi.approveTask(data) 241 await TaskApi.approveTask(data)
247 message.success('审批通过成功') 242 message.success('审批通过成功')
@@ -409,8 +404,9 @@ const getDetail = () =&gt; { @@ -409,8 +404,9 @@ const getDetail = () =&gt; {
409 data.formVariables 404 data.formVariables
410 ) 405 )
411 nextTick().then(() => { 406 nextTick().then(() => {
412 - fApi.value?.btn.show(false)  
413 - fApi.value?.resetBtn.show(false) 407 + fApi.value?.fapi.btn.show(false)
  408 + fApi.value?.fapi.resetBtn.show(false)
  409 + fApi.value?.fapi.disabled(true)
414 }) 410 })
415 } 411 }
416 412
yudao-ui-admin-vue3/src/views/bpm/processInstance/index.vue
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </template> 14 </template>
15 <!-- 当前审批任务 --> 15 <!-- 当前审批任务 -->
16 <template #tasks_default="{ row }"> 16 <template #tasks_default="{ row }">
17 - <el-button v-for="task in row.tasks" :key="task.id" type="text"> 17 + <el-button v-for="task in row.tasks" :key="task.id" link>
18 <span>{{ task.name }}</span> 18 <span>{{ task.name }}</span>
19 </el-button> 19 </el-button>
20 </template> 20 </template>