|
|
|
|
@ -11,7 +11,7 @@ |
|
|
|
|
name="first"> |
|
|
|
|
<el-card shadow="never"> |
|
|
|
|
<div ref="printBody"> |
|
|
|
|
<avue-form v-if="option && option.column && option.column.length > 0" |
|
|
|
|
<avue-form v-if="option && ((option.column && option.column.length > 0) || (option.group && option.group.length > 0))" |
|
|
|
|
v-model="form" |
|
|
|
|
ref="form" |
|
|
|
|
:option="option"> |
|
|
|
|
@ -79,7 +79,7 @@ |
|
|
|
|
v-loading="submitLoading" |
|
|
|
|
@click="handleCompleteTask(false)">驳回</el-button> |
|
|
|
|
<el-button v-if="buttonList.find(b => b.key == 'wf_transfer')" |
|
|
|
|
type="warning" |
|
|
|
|
type="primary" |
|
|
|
|
size="medium" |
|
|
|
|
v-loading="submitLoading" |
|
|
|
|
@click="handleUserSelect('transfer')">转办</el-button> |
|
|
|
|
@ -89,7 +89,7 @@ |
|
|
|
|
v-loading="submitLoading" |
|
|
|
|
@click="handleUserSelect('delegate')">委托</el-button> |
|
|
|
|
<el-button v-if="buttonList.find(b => b.key == 'wf_print')" |
|
|
|
|
type="warning" |
|
|
|
|
type="info" |
|
|
|
|
size="medium" |
|
|
|
|
v-loading="submitLoading" |
|
|
|
|
@click="handlePrint()">打印</el-button> |
|
|
|
|
@ -202,19 +202,46 @@ export default { |
|
|
|
|
option.menuBtn = false |
|
|
|
|
if (status != 'todo') option.detail = true |
|
|
|
|
else { |
|
|
|
|
const arr = [] |
|
|
|
|
const columnArr = [] |
|
|
|
|
const groupArr = [] |
|
|
|
|
const vars = [] |
|
|
|
|
taskForm.forEach(task => { |
|
|
|
|
const column = option.column.find(c => c.prop == task.id) |
|
|
|
|
if (task.readable && column) { |
|
|
|
|
if (!task.writable) { |
|
|
|
|
column.readonly = true |
|
|
|
|
column.disabled = true |
|
|
|
|
} else vars.push(column.prop) |
|
|
|
|
} |
|
|
|
|
arr.push(column) |
|
|
|
|
}) |
|
|
|
|
option.column = arr |
|
|
|
|
const { column, group } = option |
|
|
|
|
if (column && column.length > 0) { // 处理column |
|
|
|
|
column.forEach(col => { |
|
|
|
|
const c = taskForm.find(s => s.id == col.prop) |
|
|
|
|
if (c && c.readable) { |
|
|
|
|
if (!c.writable) { |
|
|
|
|
col.readonly = true |
|
|
|
|
col.disabled = true |
|
|
|
|
delete col.rules |
|
|
|
|
} else vars.push(col.prop) |
|
|
|
|
columnArr.push(col) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (group && group.length > 0) { // 处理group |
|
|
|
|
group.forEach(gro => { |
|
|
|
|
if (gro.column && gro.column.length > 0) { |
|
|
|
|
const groupColumnArr = [] |
|
|
|
|
gro.column.forEach(col => { |
|
|
|
|
const c = taskForm.find(s => s.id == col.prop) |
|
|
|
|
if (c && c.readable) { |
|
|
|
|
if (!c.writable) { |
|
|
|
|
col.readonly = true |
|
|
|
|
col.disabled = true |
|
|
|
|
delete col.rules |
|
|
|
|
} else vars.push(col.prop) |
|
|
|
|
groupColumnArr.push(col) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
gro.column = groupColumnArr |
|
|
|
|
} |
|
|
|
|
if (gro.column.length > 0) groupArr.push(gro) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
option.column = columnArr |
|
|
|
|
option.group = groupArr |
|
|
|
|
this.vars = vars |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -271,6 +298,8 @@ export default { |
|
|
|
|
}).catch(() => { |
|
|
|
|
this.submitLoading = false |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.submitLoading = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|